Please keep your threads tidy. Don't spam the list with the same question.

The file that contains the line:

var myvalue = "<%= myservervalue%>";

... is a .js file, right? It's been a long time, but I'm guessing the
ASP interpreter isn't set by default to parse .js files.

Put the line in the head of the HTML file you're creating (ie. your ASP script):

<script type="text/javascript">
var myvalue = "<%= myservervalue%>";
</script>

And it's really not a good idea to create your own attributes for HTML
elements. Not unless you reference your own
DTD and, even then, you're looking for trouble.


On Wed, Dec 10, 2008 at 12:34 AM, JQueryProgrammer
<[EMAIL PROTECTED]> wrote:
>
> I am migrating my existing ASP application javascript code to jquery.
> However places where i want to get the value from server, I am getting
> an error like:
>
> var myvalue = "<%= myservervalue%>";
>
> when i check in myvalue, it is populated with <%= myservervalue%> as
> string. If I try to remove "" then it gives an error in comparison.
> Any help would be appreciated.

Reply via email to