Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Unable to Read/Set Text Box in ASPX Web page using Javascript

Reply
Thread Tools

Unable to Read/Set Text Box in ASPX Web page using Javascript

 
 
rameshk75 rameshk75 is offline
Junior Member
Join Date: Oct 2006
Posts: 1
 
      10-25-2006
Hi,

Am using the below code to popup a modal dialog box.
I got the value back from the child window to the parent window.
Now i want to assign the value to one of the text boxes on the parent window.

Before that i was just checking the value in the text box and am getting an error message that document.form... is null or object not reference.

Can someone help me out in reading and setting the value to/from the parent page's text box.

I have tried with many combination of the javascript like:
document.forms[0].elements[txtTitle].value
document.form1.txtTitle.value

and few others....


Here is the code

************************************************** ***
Response.Write(" <script language=""javascript"">")
Response.Write(" {")
'Response.Write(" var strReturn; strReturn=window.showModalDialog('child.aspx',null ,'status:no;dialogWidth:370px;dialogHeight:220px;d ialogHide:true;help:no;scroll:no');if (strReturn != null) document.getElementById('txtTitle').value=strRetur n;")
Response.Write(" var strReturn; strReturn=window.showModalDialog('child.aspx',null ,'status:no;dialogWidth:370px;dialogHeight:220px;d ialogHide:true;help:no;scroll:no');")
Response.Write(" alert(document.frmMaterialRequest.elements[txtTiltle].value); }")
Response.Write(" </script>")
*********************************************

Thanks in Advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
How to fire off a completely seperate .aspx page from within an .aspx web page. S_K ASP .Net 1 10-02-2007 12:05 AM
How to fire off a completely seperate .aspx page from within an .aspx web page. S_K ASP .Net 0 10-01-2007 10:40 PM
How to fire off a completely seperate .aspx page from within an .aspx web page. S_K ASP .Net 0 10-01-2007 10:40 PM
How to fire off a completely seperate .aspx page from within an .aspx web page. S_K ASP .Net 0 10-01-2007 10:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57