If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member prophil's Avatar
    Join Date
    Aug 2007
    Member #
    Ok. I've got this problem with a script.

    You see, I want to make a dynamic site wich I won't have to update manually afterwards. So I made .js files that I call up on some webpages that I don't want to upgrade for nothing. Those .js files are date targeted wich means that, for example, between september 1st and 30th and image or a text shows up. Afterwards, a new image or new text shows up. It works fine but I have this problem with a link I want to create.

    In one .js file I put a document.write statement wich writes an hyperlink into a list. I want to include a statement into that link so that it opens up in a new window with specified settings (height, width and no scrollbars). I know how to use the code in any other situations, but on this case it just don't work.

    I've tried these two methods :

    if (month==7)
    document.write('<li class="style17"><a href="'link.html', '','height=500,width=625,scrollbars=1');">ddd</a></li>')

    --> Only hides the link. No show.

    B) I've tried to put the into a function and then calling it into the link. (see the attached file for the whole .js script)

    --> Same thing.

    Somebody just give me a hint please.


  3. #2
    Senior Member
    Join Date
    Jun 2005
    Atlanta, GA
    Member #
    1 times
    You'll have to escape the single quotes inside the HTML string. Just put a \ in front of them.

  4. #3
    Junior Member prophil's Avatar
    Join Date
    Aug 2007
    Member #
    Just what I needed.

    Thank you so much!

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 01:51 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: