[thelist] string help SOLVED

Tom Dell'Aringa pixelmech at yahoo.com
Fri Nov 1 11:16:01 CST 2002


Lots of good suggestions, unfortunately none of them quite worked,
but I figured it out in the end. I switched the opening quotes to
doubles which helped me figure it out. I also put together the cb_
and the id BEFORE hand so I didn't have to concatenate it in the
string.

The key was putting the \"" and "\" where I needed the string.

var curBox = "cb_" + id;

cell.innerHTML = "<a href='javascript: deleteDoc(\""  + curBox +
"\")'><img src='delete.gif' width='14' height='14' alt=''
onmouseover='this.src=\"delete_on.gif\"'
onmouseout='this.src=\"delete.gif\"' /></a>";

Tom


--- "Anthony_Johnston_._Antix" <tech at antix.co.uk> wrote:
> var q=String.fromCharCode(39);
> cell.innerHTML = '<a href="javascript:
> deleteDoc('+q+'lalala'+q+')">blah</a>';
>
> cheez,  Ant.
>
> >-----Original Message-----
> >From: thelist-admin at lists.evolt.org
> >[mailto:thelist-admin at lists.evolt.org]On Behalf Of Tom Dell'Aringa
> >Sent: 31 October 2002 20:03
> >To: thelist at lists.evolt.org
> >Subject: [thelist] string help
> >
> >
> >Ok, this is driving me nuts!
> >
> >I have this:
> >
> >cell.innerHTML = '<a href="javascript: deleteDoc()">blah</a>'
> >
> >Forget about my poor link usage with JS and all that, I have no
> >choice. What I DO need to do is write this for the parameter of
> the
> >deleteDoc() function:
> >
> >"cb_3"
> >
> >now the number 3 is equal to a parameter in this function of ID.
> >
> >The cb_ part is written before this, this is all working on a
> >checkbox. What I have in my doc is a checkbox like this:
> >
> ><input type="checkbox" id="cb_3"> blah blah
> >
> >I have to pass this name in my deleteDoc() function as a STRING. I
> >cannot seem to get it right. Part of it is this
> >
> >"cb_" + ID but I can't seem to get the quotes around the string!
> >
> >TIA
> >
> >Tom
> >
> >=====
> >var me = tom.pixelmech.webDeveloper();
> >
> >http://www.pixelmech.com/
> >http://www.maccaws.com/
> >[Making A Commercial Case for Adopting Web Standards]
> >
> >__________________________________________________
> >Do you Yahoo!?
> >HotJobs - Search new jobs daily now
> >http://hotjobs.yahoo.com/
> >--
> >For unsubscribe and other options, including
> >the Tip Harvester and archive of thelist go to:
> >http://lists.evolt.org Workers of the Web, evolt !
> >
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/



More information about the thelist mailing list