Pop up window problem with dynamic textboxes and query string

K

Kapil Jain

Dear All,
What i need to achieve is :
I am generating dynamic text boxes thru dhtml coding, i need onChange
event of oragnistation text box i.e dynamically generated on click of
"More" button in myhtml page
in series manner like oragnisation0,oragnisation1,oragnisation2 and so
on,
and popup window will open onChange event of (oraganisation<iCount>)
with one query string / parameter i.e value of oraganisation so that i
will use that parameter as searching crieterion in pop window form, and
that will show data corresponding to that value. Further user can click
on any value displayed in popup windows finally all values in popup
window will now set in parent form like oraganisation name, area, city
etc so basically i need search form will open in pop up window with 1
paramater and display record accordingly. I have achived this thing in
static form and static textbox onChange event, but when i put the
onChange even with " ?id= " in below code as
onChange='javascript: openWin(contact_list.php"+(str)+iCount+".value)'
where (str) = ?id=

var strTemp = "id=organisation";
str = "?" + strTemp;

i will get an error expected ":" on line number....
So i only want that somehow i'll be able to open popup window with
querystring as
openWin(contact_list.php?id=organisation<(iCount)>.value)

The error will not come if i'll remove "?" from the code.

Thanks for Help in advance
Below is actual code in which I'm getting error :
<script>
var strTemp = "id=organisation";
str = "?" + strTemp;

cust1.innerHTML +="<table width=100% border=0 cellpadding=0
cellspacing=0><tr><td><table width=100% border=0 cellspacing=0
cellpadding=4><tr><td width=10%><strong>Title</strong></td><td
width=11%><strong>First Name </strong></td><td width=11%><strong>Last
Name said:
<strong>Area</strong></td><td width=41% class=name>&nbsp;</td></tr><tr><td><label><select name=title" +iCount+" id=title" +iCount+ "><option value=Mr. selected=selected>Mr.</option><option value=Ms.>Ms.</option></select></label></td><td><input name=first_name" +iCount+ " type=text id=first_name" +iCount+ " size=10/></td><td><input name=last_name" +iCount+ " type=text id=last_name" +iCount+ " size=10/></td><td><input name=designation" +iCount+ " type=text id=designation" +iCount+ " size=15/></td><td><input name=organisation" +iCount+ " type=text id=organisation" +iCount+ " size=15 onChange='javascript: openWin(contact_list.php"+(str)+iCount+".value)'/></td><td><input name=area" +iCount+ " type=text id=area" +iCount+ " size=15/></td><td>&nbsp;</td></tr></table></td></tr><tr><td><table width=100% border=0 cellspacing=0 cellpadding=4><tr><td width=90><strong>City</strong></td><td width=90><strong>Mobile</strong></td><td width=91><strong>Landline</strong></td><td width=91><strong>Email</strong></td><td><strong>Helpful to PT ?</strong></td><td><strong>Rating</strong></td></tr><tr><td><span class=name><input name=city" +iCount+" type=text id=city" +iCount+" value='' size=15/></span></td><td><span class=name><input name=mobile" +iCount+" type=text id=mobile" +iCount+" value='' size=15 /></span></td><td><span class=name><input name=landline" +iCount+" type=text id=landline" +iCount+" value='' size=15/></td><td><span class=name><input name=email" +iCount+" type=text id=email" +iCount+" value='' onblur='javascript:return echeck(document.frm.email" +iCount+".value)' size=15/></span></td><td><label><select name=helpful" +iCount+" id=helpful" +iCount+"><option value=Yes>Yes</option><option value=No>No</option></select></label></td><td><select name=rating" +iCount+" id=rating" +iCount+"><option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option><option value=5>5</option><option value=6>6</option><option value=7>7</option><option value=8>8</option><option value=9>9</option><option value=10>10</option></select></td></tr><tr><td colspan=6><hr /></td></tr><tr><td colspan=6></td></tr></table></td></tr></table>";

</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,522
Latest member
Mad-Ram

Latest Threads

Top