Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Can't get Javascript to write out correctly
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  00:19:12  Show Profile
Here is the ASP source:

		"                          <td><a href=""Javascript:editor.insertHTML('" & getCurrentIcon(strIconSmileQuestion,"Question [?]","") & "')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Question [?]","") & "</a></td>" & vbNewLine & _


Here is the output:

<td><a href="Javascript:editor.insertHTML('<img src="images/icon_smile_question.gif" width="15" height="15" border="0" alt="Question [?]" title="Question [?]" />')" tabindex="-1"><img src="images/icon_smile_question.gif" width="15" height="15" border="0" alt="Question [?]" title="Question [?]" /></a></td>


Why the hell does it look like this??:

')" tabindex="-1">

TIA

Edited by - Dave. on 27 June 2003 00:19:59

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  01:06:37  Show Profile
don't you have to escape the double quotes or something?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  01:12:37  Show Profile
I don't know Javascript... I would assume so though. I'm just not sure how.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  01:16:29  Show Profile
Ummm... okay .. try this (I'm not so great at javascript either):
		"                          <td><a href=""Javascript:editor.insertHTML('" & Replace(getCurrentIcon(strIconSmileQuestion,"Question [?]",""),"""","\""") & "')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Question [?]","") & "</a></td>" & vbNewLine & _

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 27 June 2003 01:17:44
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  01:31:34  Show Profile
Nope :(

Same error. :(
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  01:53:22  Show Profile
what happens if you just hard code it?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  01:54:23  Show Profile
Same exact thing, that was what I tried before as well...
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  01:56:29  Show Profile
also, are you inserting this in a post? if so, the forum code will mess with your output.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  01:57:23  Show Profile
and what are you trying to do exactly?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  01:59:59  Show Profile
Don't worry about the forum code messing with it

I need to have the smiles insert as HTML images into the textarea, and editor.InsertHTML is how it mus be done, as it isn't a 'normal' textarea.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  02:21:33  Show Profile
Try something like this then:
<script language="javascript">
function doCode(gifURL) {
	return ('<img src=\"' + gifURL + '\" />');
}
</script>
<a href="#" onClick="editor.insertHTML(doCode('images/mypic.gif'));" tabindex="-1"><img src="images/mypic.gif" /></a>

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  02:23:43  Show Profile
you must be updating the RTE MOD?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 27 June 2003 :  09:48:55  Show Profile
Thank you Nikkol!!! Works perfectly.

Yeah, this is for my RTE MOD ...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07