•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,939 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,815 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 511 | Replies: 2
![]() |
•
•
Join Date: Feb 2008
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 1
<input type=text class=text_box2 name=lstMAName"+s+" onchange=showMAName(escape(this.value),"+s+") id=select2>
in the above code iam sending the selected value to the ajax function showMAName(str,str1) in select.js
but there iam not getting the full value of this.value ( means if any space in the string like "how r u", iam getting only "how")
i here that the solution is escape and unescape but i use like in above code but not working
can u plz tell me
thanqs
•
•
Join Date: Aug 2008
Posts: 375
Reputation:
Rep Power: 1
Solved Threads: 34
I don't know if this is your problem, but be nice to your browser -- quote your attribute properties. I'm thinking it should look more like this...
Question:
So what is this
If it's supposed to be a javascript variable, is this line supposed to be being written with a javascript
If it's not a javascript variable then what is it exactly
And if it is a javascript variable but not generated with a javascript
If you clarify your situation I will try to help you more
Otherwise
:-)
<input type="text" class="text_box2" name="lstMAName" + s + onchange="showMAName( escape( this.value )," + s + ")" id="select2" />
Question:
So what is this
+s+ following the name attribute and in the showMAName function arguments?If it's supposed to be a javascript variable, is this line supposed to be being written with a javascript
write() because that piece of information sure would come in handy to solving your problemIf it's not a javascript variable then what is it exactly
And if it is a javascript variable but not generated with a javascript
write() then your html element is not getting that data.If you clarify your situation I will try to help you more
Otherwise
escape() and unescape() work as prescribed.:-)
•
•
Join Date: Feb 2008
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 1
i didn't get u? but in that is a javascript variable
and what ever i am sending the that code is wrote in javascript only
and come to the function showMAName
that ajax function
and what ever i am sending the that code
<input type="text" class="text_box2" name="lstMAName" + s + onchange="showMAName( escape( this.value )," + s + ")" id="select2" />
and come to the function showMAName
JavaScript Syntax (Toggle Plain Text)
function showMAName(str,str1) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } alert(str) var str=unescape(str); alert(str) var url="getSaname.jsp"; url=url+"?maname="+str+"&rowid="+str1; document.getElementById("str").value=str1; xmlHttp.onreadystatechange=stateChanged1; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChanged1() { if (xmlHttp.readyState==4) { var str=document.inetform.str.value document.getElementById("lstSAName"+str).innerHTML=xmlHttp.responseText; } }
Last edited by peter_budo : Aug 12th, 2008 at 11:34 am. Reason: Use code tags instead of quote!
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Escape and Unescape / Handling (C)
- Passing data from forms from one page to another (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Validation for (.) and (,)
- Next Thread: Filtered search function on a website


Linear Mode