Website Babble Webmaster Forums  


Go Back   Website Babble Webmaster Forums > Creating a Website > HTML, PHP, CSS, Javascript & Coding/Programming Topics

Your WB Notifications

Reply
 
LinkBack Thread Tools Display Modes
  #16 (permalink)  
Old 11-03-2009, 05:58 PM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

The specific problem you mention is because you've used double quotes around width=600. This has closed the onclick parameter, so your browser thinks width is a parameter of the a instead. Change it to ,'width=600 (so no double quote at the start or at the end, but keep the opening single quote). Also add a comma before width=600 (like this ,'width=600) to separate the first and second parameters of the open function.

And obviously do what sequencehosting says too.
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #17 (permalink)  
Old 11-03-2009, 06:48 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

So I made some changes but the link is still not working working, there are still errors within the tag that i cannot find. I ahve provided my coding below.
<a href="<a href="promotion%20pays%20products/WB%204000.jpg" onclick="javascript:void(window.open('http://www.promotionpays.com','','width=600,height=600,le ft=0,top=0,resizable=yes,menubar=no,location=yes,s tatus=yes,scrollbars=yes'))">promotion%20pays%20pr oducts/WB%204000.jpg</a>

I am trying to get a link window to open up as a small avereage size box- the link is promotion%20pays%20products/WB%204000.jpg. If someone can acutally place all the requirements in where it should be, I think it will help me in knowing what I am doing wrong and would better assist me in solving the problem.
Reply With Quote
  #18 (permalink)  
Old 11-03-2009, 07:28 PM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

OK, try this

HTML Code:
<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes');">promotion%20pays%20products/WB%204000.jpg</a>
What's changed?

- Removed second <a href=" (you only need to start the tag once )

- Removed javascript:void( - saying it's JavaScript isn't necessary as it's in the onclick. Similarly void isn't needed here as this isn't a href (and anyway, return false is better really).

- Removed spaces between le and ft and s and tatus.

- Removed void's balancing ) at end (no longer required, as the void's gone).

- Changed link in window.open to promotion%20pays%20products/WB%204000.jpg, as that's the file you want to open.

- Added ; to end of statement.

As it stands, this will open the image in both the current window and a new popup. To change this to just a popup, make the onclick return false.

HTML Code:
<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes'); return false;">promotion%20pays%20products/WB%204000.jpg</a>
__________________
Pole Exercise - Pole dancing evolved

Last edited by meloncholy; 11-03-2009 at 07:30 PM.
Reply With Quote
  #19 (permalink)  
Old 11-03-2009, 08:14 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

Thanks for the suggestions, however, the problem I am expereicing now is the info for the return flase is showing up within my pageabove the image. This should not be happening and I am having difficulties fixing the problem.
Reply With Quote
  #20 (permalink)  
Old 11-03-2009, 08:25 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

As I mentioned above the info for the return flase is showing up on my page above my image. this should only be present within the coding. I did however view my website in browser and checked to see if the link writing above my image will open up a small window with the image. the window did open up to the size that I want but no image was there and also as mentioned the writing that is suppose to be in the coding should not be within my page.

Originally, I made a link to the image which can be seen below the href coding. I am not sure if I should be taking out this second coding that refers to the same image. There is a problem within this second line of coding when the href coding is placed... the problem that is stated says, the </a> is marked as invalid becasue it is a mismatched end. I have provided the codings below...


<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,m enubar=no,location=yes,status=yes,scrollbars=yes') ; return false;">promotion%20pays%20products/WB%204000.jpg</a>
<img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
Reply With Quote
  #21 (permalink)  
Old 11-03-2009, 08:36 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

so i cannot erase the second line of coding below the href, because it deletes my image.
I believe the problem of my image not showing up in the window and code showing up within my webpage is due to the problem in the href coding. the second line of coding(re: img) with the link alone works fine, only that the window is too big
Reply With Quote
  #22 (permalink)  
Old 11-04-2009, 11:25 AM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

Your JavaScript code seems to work OK now, though there's a space in menubar you should kill. I don't see return false; on my page, so I suspect the code you pasted above (which works) is different from that on your site.

The </a> error is because you've closed the tag twice: once after the text promotion%20pays%20products/WB%204000.jpg and once after the image. The opening and closing tags surround the content you want to form part of the link: if that's some text, just put the text between them; if it's an image, put the image between them; if it's both, put both between them. But only use 1 closing tag.

I'm afraid I don't understand the problem you're having with hrefs or images or, um, something.
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #23 (permalink)  
Old 11-04-2009, 03:30 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

Yeah, there is something clearluy wrong with the coding. the following is showing up on my webpage above my image, promotion%20pays%20products/WB%204000.jpg. and this becomes the clickable link, not the image itself. Also, no image appears when the link is clicked on and opens. I do not believe I am doing anything wrong, I am copying the coding above and pasting as stated, the only change I have made is the </a> tag.
my coding is show as ok in my editor but as I mentioned below, some of the coding(promotion%20pays%20products/WB%204000.jpg.) shows up on my webpage above the link, which should not be happening and there is no image that appears when the link is click and the link should be within my image, not written on my page. help by anyone would be great in solving this problem

my image is as stated below...
Reply With Quote
  #24 (permalink)  
Old 11-04-2009, 03:31 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

Oh sorry here is my coding....

<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,m enubar=no,location=yes,status=yes,scrollbars=yes') ; return false;">promotion%20pays%20products/WB%204000.jpg
<img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
Reply With Quote
  #25 (permalink)  
Old 11-04-2009, 03:38 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

ok, so I have solved the problem with part of the coding showing up on my web page, I erased it. Now when I click on my image, the window opens up to the desired size within the coding above; however, my image is not displaying with the the box... the message I am receiving states...Firefox can't find the file at /C:/Users/Ochie/Desktop/promotionpays/FruitStores/promotion pays products/WB 4000.jpg.
Reply With Quote
  #26 (permalink)  
Old 11-04-2009, 03:51 PM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,337
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
ok, so I have solved the problem with part of the coding showing up on my web page, I erased it. Now when I click on my image, the window opens up to the desired size within the coding above; however, my image is not displaying with the the box... the message I am receiving states...Firefox can't find the file at /C:/Users/Ochie/Desktop/promotionpays/FruitStores/promotion pays products/WB 4000.jpg.
What folder is your website? promotionpays? If so this is the code

Code:
<a href="#" onclick="window.open('http://www.promotionpays.com','', 'width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes');"><img src="/promotion_pays_products/WB_4000.jpg" width="" height="" alt="image" /></a>
It really is hard to see what your trying to do.

What image do you want to be the link? and website would you like it to link to?
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Our Disk Space and Bandwidth Has Been Doubled! Learn More
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote
  #27 (permalink)  
Old 11-04-2009, 03:56 PM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,337
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
Oh sorry here is my coding....

<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,m enubar=no,location=yes,status=yes,scrollbars=yes') ; return false;">promotion%20pays%20products/WB%204000.jpg
<img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
Sorry I missed this post. Try this

Code:
<a href="promotion%20pays%20products/WB%204000.jpg" onclick="window.open('promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes'); return false;"><img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
All you need to do is remove this code

promotion%20pays%20products/WB%204000.jpg

between > and <img
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Our Disk Space and Bandwidth Has Been Doubled! Learn More
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote
  #28 (permalink)  
Old 11-05-2009, 12:03 AM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

I am trying to get this image ("../promotion%20pays%20products/WB%204000.jpg") to show up in a small window when the image is clicked. I did try your code and it works, but it is opening up to my website, not my image. I would like my image to show up in the window.

below is the link you provided me that I have used and it works but only links to my website not to my image...
<a href="#" onclick="window.open('http://www.promotionpay.com','', 'width=600,height=600,left=0,top=0,resizable=yes,m enubar=no,location=yes,status=yes,scrollbars=yes') ;"><img src="/promotion_pays_products/WB_4000.jpg" width="" height="" alt="image" />
<img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
Reply With Quote
  #29 (permalink)  
Old 11-05-2009, 06:48 AM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,337
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
I am trying to get this image ("../promotion%20pays%20products/WB%204000.jpg") to show up in a small window when the image is clicked. I did try your code and it works, but it is opening up to my website, not my image. I would like my image to show up in the window.

below is the link you provided me that I have used and it works but only links to my website not to my image...
<a href="#" onclick="window.open('http://www.promotionpay.com','', 'width=600,height=600,left=0,top=0,resizable=yes,m enubar=no,location=yes,status=yes,scrollbars=yes') ;"><img src="/promotion_pays_products/WB_4000.jpg" width="" height="" alt="image" />
<img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
Try this:

Code:
<a href="#" onclick="window.open('../promotion%20pays%20products/WB%204000.jpg','', 'width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes');"><img src="/promotion_pays_products/WB_4000.jpg" width="" height="" alt="image" /><img alt="water bottles " height="192" src="../promotion%20pays%20products/WB%204000.jpg" width="128" class="style57" /></a><br />
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Our Disk Space and Bandwidth Has Been Doubled! Learn More
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote
  #30 (permalink)  
Old 11-05-2009, 04:12 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

Thanks you so much for your help; the link work and my image is displaying in the box in the right size as it should. Now, I have a question, I have abouot 200 images which I would like to open up the same way link wise, will I have to manually have to copy and past the code for all these images to open up the same way or is there an easier way to save me time? Origninally, when I am linking an image, I just highlight it and drag to file I would like to link it to, I did not have to go into the coding to do anything, so what I am asking is if there is a way i can still continue to link my images the same way with window of the same size opening up.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -6. The time now is 06:44 PM.


 Subscribe to RSS

WB Sponsors

flash chat

Home Jobs Online

Search Engine Marketing

Paid Surveys

Web Design Newcastle

Bookmarking Demon 5



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0