Link to home
Start Free TrialLog in
Avatar of Barkley
Barkley

asked on

Javascript to pass a value to the hidden field of the HTML it is calling

A javascript in temp.html will open temp2.html. Can javascript in temp.html pass a value to a hidden field of temp2.html so that the hidden field in temp2.html has initial value after temp2.html has been loaded by browser.
I appreciate any help. thanks.
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gsatsan
gsatsan

you could do this :
in temp1:
<script>
var toBePassedToTemp2 = "someValue";
</script>

and in temp2:
<script>
document.forms[0].elements["hidddenField"].value = window.opener.toBePassedToTemp2;
</script>
That would do...
</script>
but only if temp1 and temp2 are open at the same time

Michel
This question appears to have been abandoned. All your open questions today are at the bottom.   Your options are:
 
1.  Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3.  Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4.  Delete the question. Again, you must tell the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below, include the question QID/link.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp


PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
 
P.S.  For year 2000 question, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

--------------------------------------------------------------------------------------------------------------------------
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11491598
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11841338
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20030944
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20064444
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20073798
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20080485
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20132911
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11917378
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20262706

This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I will recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to mplungjan

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
Per recommendation, force-accepted.

Netminder
CS Moderator