SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast Wouter's Avatar
    Join Date
    Jan 2002
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nesting javascript question?

    Is it possible to add the <A href="javascript..> line in a document.write script?

    Now I had to break it open into 2 scripts with the <A href="javascript..> in the middle.

    <script src="js/top2a.js"></script>
    <A href="javascript:bookmark('http://www.dummy.com','Dummy')">
    <script src="js/top2b.js"></script>

    Thanks & Greetings Wouter

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried it?...that would be your best bet. I have never had to do this so i wouldn't know. I know you can 'write' javascript tags.

    document.write("<script type='java"+"script1.2'>");

    That might help you
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2002
    Location
    UK
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is this what you want?

    Code:
    document.write('<a href="javascript:bookmark(\\'http://www.dummy.com\\',\\'Dummy\\')">bookmark</a>');
    btw: java script should be one word (i'll get the hang of posting code and escape chars one day )


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •