Forums: [SOLVED] Conditionally hiding DIV in Child record View page - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] Conditionally hiding DIV in Child record View page Rate Topic: -----

#1 User is offline   swiersman 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 14-July 06

Posted 15 March 2018 - 04:23 PM

Hi All,


This is my first time using relational tables in ASPRunner, but I hope someone has a answer for this:

1. I created an app that is called "ServiceCenter". It has a number of fields it pulls from the parent table.
2. It also has a child table included called "Details".
3. Everything works great when Adding, Editing and Viewing records.
4. When I go to conditionally hide one of the DIVs in "Service Center" in the EVENTS\dbo.ServiceCenter\View Page\Javascript onload and insert the following it works great:

var xxxxxx = Runner.getControl(pageid,'xxxxx');
if(xxxxxx.getValue()=='xxxxxxx)

document.getElementById("xxxxxxxxx").style.display = 'none';

end if

5. When I go to conditionally hide one of the DIVs in "Details" (Child table) in either the EVENTS\dbo.Details\View Page\Javascript onload or EVENTS\dbo.Details\List Page\Javascript onload with the above script nothing happens.


Does anyone know how to solve this or if you can conditionally hide a div in a child table?

Many Thanks,

Scott
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15941
  • Joined: 03-February 03

Posted 15 March 2018 - 06:57 PM

I'm not really sure what are "divs in a child table". Is that something that you added manually?

Anyway, the same code should work as long as you specified a correct ID of HTML element.
Best regards,
Sergey Kornilov
0

#3 User is offline   i.NoLim 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 75
  • Joined: 11-September 17

Posted 16 March 2018 - 03:11 PM

View Postadmin, on 15 March 2018 - 10:57 AM, said:

I'm not really sure what are "divs in a child table". Is that something that you added manually?

Anyway, the same code should work as long as you specified a correct ID of HTML element.

I think he's talking about an HTML <div> tag.

I agree with admin. I have a similar set up as yours and the following code works for me.

https://xlinesoft.co...idefield_js.htm
0

#4 User is offline   swiersman 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 14-July 06

Posted 16 March 2018 - 04:03 PM

Thanks All,

Upon further investigation, it looks like that java script API and the below script can only be used for ADD/EDIT/VIEW.

Since this is a child table, it appears in the parent application as a section which shows the child table LIST page and I can not use this script.

Is there any other script I could use, or any other way to force the View page to be shown instead of the LIST page for the child section?

Many Thanks,

Scott
0

#5 User is offline   i.NoLim 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 75
  • Joined: 11-September 17

Posted 16 March 2018 - 06:49 PM

I'm a little confused as to what exactly needs to be done. You want to display the "View page" of the specific entry in the "Details" table that matches the "Service Center" entry when clicking the "Show details" button?

Are never going have multiple entries in the "Details" table that are linked to a single entry in "Service Center?"
0

#6 User is offline   swiersman 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 14-July 06

Posted 21 March 2018 - 04:08 PM

Sorry for the confusion.

Background:

  • The Main form is utilizing the dbo.ServiceCenter table.
  • The "dbo.ServiceCenter" is the parent table and the "dbo.DEPLOYMENT TASKS" is the child table joined by the ID column
  • The DEPLOYMENT TASKS form shows up as a Details Section in the Main forms View "Fields order and totals" page.
  • When the project is built; in View, the LIST page of DEPLOYMENT TASK Details section is showing.
  • This all works great.

Issue:

I need to hide a certain field in the DEPLOYMENT TASK Details section (LIST PAGE) based upon one fields' value within the dbo.DEPLOYMENT TASK table.
The code snippets provided say they work for ADD, EDIT and VIEW but do not work for LIST.


I was hoping someone knew how to conditionally hide a field in a LIST page based upon one fields value within a table I guess is what it comes down to.


Sorry for any confusion , hope someone can help.


Scott
0

#7 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15941
  • Joined: 03-February 03

Posted 21 March 2018 - 04:17 PM

Hiding a field on the List page:
https://xlinesoft.co...s/hidefield.htm
Best regards,
Sergey Kornilov
0

#8 User is offline   swiersman 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 14-July 06

Posted 06 April 2018 - 01:27 PM

View Postadmin, on 21 March 2018 - 12:17 PM, said:

Hiding a field on the List page:
https://xlinesoft.co...s/hidefield.htm



Perfect! Many Thanks....


Scot
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked