Advertisement

03.17.2008 at 03:12PM PDT, ID: 23248671
[x]
Attachment Details

javascript: update a form field with a random value

Asked by AkisC in JavaScript

Tags:

I have an .asp page named typeCode.asp with one form filed named myCode
In this page I have an iframe to load another page within
<iframe src="randomSelection.asp" width="560" height="100"></iframe>

The randomSelection.asp selects a random field value from a large access database and places this value on a button
<input onclick="UpdateMain('<%=kodRandom%>');" type="button" style="font-family: courier" value="<%=kodRandom%>" name="T26">&nbsp;<a href="javascript:location.reload()"><img border="0" src="images/refresh.bmp"></a>
If the user clicks on the refresh icon, the randomSelection.asp selects another random field value. (I do not want the typeCode.asp to refresh- that's why I thought of an iframe)

Can some one provide me with the javascript function
UpdateMain(thisCode) that will update the typeCode.asp page-form filed myCode=thisCode ?
-or- suggest a better way to achive this...

Thank you
Start Free Trial
[+][-]03.17.2008 at 03:16PM PDT, ID: 21146676

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 03:25PM PDT, ID: 21146779

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 05:23PM PDT, ID: 21147570

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: Javascript
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628