Elroy Taulton
asked on
Call Two Different Weblinks for one Java File
I have the need to call two separate weblinks from one java script file. Is this possible?
The first link will initiate the login screen. The second link will pass a variable that will retrieve a specific page (document).
I want to embed this in one file and then be able to pass the variable to the java script file when I run it. If java script is not the way to go but it is doable, please let me know that also.
The first link will initiate the login screen. The second link will pass a variable that will retrieve a specific page (document).
I want to embed this in one file and then be able to pass the variable to the java script file when I run it. If java script is not the way to go but it is doable, please let me know that also.
ASKER
So for instance, how would I list the following two links?
http://server.com/idm/hms/ca12/index.jsp?task.tag=HMSSearchHWSWRequests
http://server.com/idm/hms/ca12/hms/page/jsp/ViewAllUserEquipmentRequestHistoryController.jsp?searchFilterValue=PurchaseOrderNumber&poValue=<PONUM>
PONUM is a variable that I will be passing to the script. But I want the second link to be performed automatically, without additional user input; if that makes sense.
http://server.com/idm/hms/ca12/index.jsp?task.tag=HMSSearchHWSWRequests
http://server.com/idm/hms/ca12/hms/page/jsp/ViewAllUserEquipmentRequestHistoryController.jsp?searchFilterValue=PurchaseOrderNumber&poValue=<PONUM>
PONUM is a variable that I will be passing to the script. But I want the second link to be performed automatically, without additional user input; if that makes sense.
Waht you may do - you can have a form and
put the second link as its action.
Then when yuser just presses enter it will go there.
For the first link you cna make a button within your html page as I wrote above
and then you shoule add a small javscript function in the head of your page that
woul put your first link as location
I''ll post a simple examnple of such function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to one screemn, another - to another screen
For example below I show how you can have two buttoins which call differnt javscript functions
and inside each yone you can direct to different lnks, say using
location= ...link here...
statment of JavaScript
Open in new window
You can do it just with simple links also
This question is related to JavaScript but should not beling to Java Programming Language