Hi ,
the below statement is in a java program,in that xmlforDisplay is the java variable whose value i have to pass to the javascript function as follows, with the below code,I am getting the syntax error.Please help me... - out.println("<input type='button' value='Transform' onclick='javascript:eventHandlerFunction(document. formlob.lobselection.value,\''"+xmlforDisplay+"'\',null)'></td></tr></table><br><br>");
11 2823
Hi ,
the below statement is in a java program,in that xmlforDisplay is the java variable whose value i have to pass to the javascript function as follows, with the below code,I am getting the syntax error.Please help me... - out.println("<input type='button' value='Transform' onclick='javascript:eventHandlerFunction(document. formlob.lobselection.value,\''"+xmlforDisplay+"'\',null)'></td></tr></table><br><br>");
try this: - out.println("<input type='button' value='Transform' onclick='javascript:eventHandlerFunction(document.formlob.lobselection.value,\'"+xmlforDisplay+"\',null)'></td></tr></table><br><br>");
i removed 2 single quotes around the xmlforDisplay...test that out.
good luck
try this: - out.println("<input type='button' value='Transform' onclick='javascript:eventHandlerFunction(document.formlob.lobselection.value,\'"+xmlforDisplay+"\',null)'></td></tr></table><br><br>");
i removed 2 single quotes around the xmlforDisplay...test that out.
good luck
Thanks for your reply.
Still I am getting the Syntax Error..:(
oh silly me...i forgot to remove the word javascript -
out.println("<input type='button' value='Transform' onclick=eventHandlerFunction(document. formlob.lobselection.value,\'"+xmlforDisplay+"\',null)'></td></tr></table><br><br>");
-
it is not needed in the onlick event.
good luck
oh silly me...i forgot to remove the word javascript -
out.println("<input type='button' value='Transform' onclick=eventHandlerFunction(document. formlob.lobselection.value,\'"+xmlforDisplay+"\',null)'></td></tr></table><br><br>");
-
it is not needed in the onlick event.
good luck
unterminated String constant error in javascript, I am getting...
today is not my day...too many typos :( -
out.println("<input type='button' value='Transform' onclick='eventHandlerFunction(document. formlob.lobselection.value,\'"+xmlforDisplay+"\',null);'></td></tr></table><br><br>");
-
i hope thats the last of my typos.
good luck
today is not my day...too many typos :( -
out.println("<input type='button' value='Transform' onclick='eventHandlerFunction(document. formlob.lobselection.value,\'"+xmlforDisplay+"\',null);'></td></tr></table><br><br>");
-
i hope thats the last of my typos.
good luck
This time syntax error...
Im also trying lot of trial and errors...:(
what does your eventHandlerFunction look like?
the error might be in there.
what does your eventHandlerFunction look like?
the error might be in there.
I don't think so, because,I tried removing the \'"+xmlforDisplay+"\' portion in the code and given static content, then it's working fine wiht out errors.So, the only problem with this one is just appending accoring to javascript.
See the below one which I used in one of my javascript methods
The below one is fine. But I want the similarity in java method.There I am gettting the syntax error, with lot's of trials..:( - formedTd +='<tr><td align="center" width="30">'+label+'</td><td width="400"><a href="#" onclick="javascript:eventHandlerFunction(document.formlob.lobselection.value,null,\''+text+'\')">'+text+'</a></td>';
-
formedTd +='<td width="15" align="center"><input type="radio" name="guid" value='+text+'></td></tr>';
gits 5,390
Expert Mod 4TB
This time syntax error...
Im also trying lot of trial and errors...:(
hi ...
i'm not very familiar with java but the string must escape double-quotes when you start the onclick-handling with single-quotes ... otherwise the next single-quote would end the js-function and you will get an js-error - out.println("<input type='button' value='Transform' onclick='eventHandlerFunction(document.formlob.lobselection.value,\""
-
+ xmlforDisplay
-
+ "\",null);'></td></tr></table><br><br>");
kind regards
hi ...
i'm not very familiar with java but the string must escape double-quotes when you start the onclick-handling with single-quotes ... otherwise the next single-quote would end the js-function and you will get an js-error - out.println("<input type='button' value='Transform' onclick='eventHandlerFunction(document.formlob.lobselection.value,\""
-
+ xmlforDisplay
-
+ "\",null);'></td></tr></table><br><br>");
kind regards
yeah, you are correct, this is working now.I'm Thankful to you again...:)
gits 5,390
Expert Mod 4TB
hi ...
glad you got it working now ;) ... post again at TSDN when you have more questions ;) ...
and a MOD-notice:
please use the code tags when posting code ... it makes it easier to read the code and to find such little errors ;)
kind regards
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tole |
last post by:
hi all,
i have some doubts in passing variables by references in php.
i usually use
class blah
{
function Params( &$params)
{
$this->params =& $params;
}
}
|
by: Kevin Lyons |
last post by:
Hello,
I am trying to get my select options (courses) passed correctly from
the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html
I am having difficulty getting the...
|
by: Tobias Olbort |
last post by:
Hello,
i've a outer function, which takes a params-array as a parameter. I
want to pass this array to inner function with a params-array (e. g.
string.format).
When i've passed an integer to...
|
by: craigkenisston |
last post by:
Hi,
I'm trying to create a generic function to call stored procedures in a
SQL Server database.
I'm passing the params, values and the direction of the params in
arrays.
The function is...
|
by: Pritcham |
last post by:
Hi all
I've got a number of classes already developed (basic entity classes)
like the following:
Public Class Contact
Private _firstname as String
Private _age as Integer
Public Property...
|
by: simon |
last post by:
hi,
I would like to separate my javascript completely from my xhtml. in the
end there should be only
<script type="text/javascript" src="javalib.js"></script>
in the head-tag to my javascript....
|
by: haijdp |
last post by:
Hi,
I am using the following javascript method inside a js file.
function createDivRow(label,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#"...
|
by: johnjsforum |
last post by:
Buddies,
I have a web page to create HTML buttons dynamically as in the “formDivColorPicker” function
////////////////////////////////////////////////////////////////////////////////////...
|
by: q-rious |
last post by:
Hello All,
1. I would like to pass some variables (x and y below) from Javascript
to PHP, process them in PHP, and return some other variables (a abd b)
back to Javascript.
--(x,y)--...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |