HighDots Forums  

quote problem on IE6

jQuery jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.


Discuss quote problem on IE6 in the jQuery forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Julien
 
Posts: n/a

Default quote problem on IE6 - 11-05-2009 , 06:24 AM






Hi,

here's my code :

var linkpath = "test'it";
var thislink = $('a[rel=" ' +linkpath+ ' "]');

It woks fine on Firefox with the character quote ' inside linkpath
value, but IE6 return a "no value" javascript error.
I just want IE6 to not understand linkpath inside quote as quote which
define the end of my attribute value.
I searched around, tried many ways to escape quotes, replace it with
& # 39 ; , etc... but I don't get it.

By the way, is there anyway to set thislink without using simple
quote, like :

var thislink = $("a[rel=" +linkpath+ "]"); // doesn't work, but you
get the idea

Can anyone help me ? Thanks a lot.

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.