Helping ordinary people create extraordinary websites!

Go Back   Web Development Forum > Website Programming > Server-Side Scripting
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-04-2007, 12:13 PM
Junior Member
 
Join Date: Aug 2007
Posts: 1
Default frame and javascript problem

I have a simple HTML page with a iframe in it, basically when I click the button on the page it calls the javascript function which then can chnge the loaction on the frame i.e. ...myPage.html#section1.

it works but there is a problem when I click on the button it moves the webpage down too. the iframe it should move down and thats fine,why is it moving the parent page down too.

any suggestions or any correct scripts or solution that i can use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-08-2007, 08:27 PM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

It's difficult to say without seeing the page, and code you're using, but I can offer one suggestion. For the button that calls the js function, i.e. onClick="function();", try adding return false to it:
onClick="function();return false;"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
frames or javascript????? ycloutier Server-Side Scripting 1 07-24-2005 09:54 PM


All times are GMT -5. The time now is 02:23 AM.


Website Design by Ducani Media Group
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.