This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
Java Script question

Hello,
I am using java script to enlarge the thumbnails for images on this page. When I execute the code on my computer, it works fine and opens a pop-up but when I run the page as bravehost sub-domain, it doesn't do anything.
It seems like my the Java Script code is not recognized.
Thank you very much.
Pallavi

Re: Java Script question

The Bravenet ad code is dropping into the middle of the script and corrupting it.

I don't know how to get around that and keep the script. Two options that I can think of:
1. Drop the script and use a standard html link to open the larger pix (as I do in the page linked)
2. Raise a support ticket and ask Bravenet.

Re: Java Script question

Peter is correct. The Bravenet code that inserts the ads in free web sites, is incorrectly inserting the advertisements in the middle of the Javascript, but this can be fixed.

Take all of the Javascript and save it in a separate file named, say "thumbnail.js". Do not include the tags or the lines with . They are not wanted.

Then, in place of all the Javascript in your HTML page, add the following line:



I made a copy of your page and implemented this method on a free web site. You can see it at philokvetch.bravehost.com/Bharati/Compo5.html.

Re: Java Script question

Philo Kvetch Could you contact me directly at jane_1954@hotmail.com

The information on your post is incomplete (deleted?) and I need help with placing BidVertiser ads on my site which are in Java.

Browser: IE7

Re: Java Script question

The original poster never did fix his/her web site. The ads are still in the middle of the Javascript and none of it works. I probably tossed it during one of my cleanup operations, but could easily regenerate the information. But, I'm not sure that anything that was in that post, would help your situation.

I believe that BidVertiser code is just Javascript/HTML mix, not Java. Java and Javascript are two different things. I don't think any advertiser in their right mind would actually use Java. It also looks like you are using the Website Wizard. To add some Javascript you would need to use the "Code Editor" mode. Generally, the Javascript will be some simple and contain some identification variables.

The important issue with Javascript, in a Wizard creation, is syntax. The Wizard tends to remove any return characters from the HTML code, in a particular content area. This makes the code a little difficult to read, but it still works correctly, as long as all the commands are terminated properly. With HTML, this is generally not a problem, but some users generate Javascript that depends on the return character being the terminator. That's just sloppy code. Javascript, terminated properly, can work in-line just as well as HTML. The command terminator for Javascript command is a semi-colon.

There is issue using boolean expressions with the Wizard. The Wizard tends to delete logical joiners, rendering some Javascript totally useless. When that happens you need to separate the Javascript code from the HTML and store them separately. But I don't think that will be an issue with the BidVertiser code.

I would expect that BidVertiser would generate code that would work in most situations. The simplest thing to do is determine where you want the code, open the Wizards editor and switch to the Code Editor mode. Find you place in the code and insert the BidVertiser code. Save your work and test it out. You probably will not see it while your still in the editor, but a preview should show it working.

I will send you some email, in case there are some issues that can't be handled through the forums.