Register

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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    i am new to javascript i have 2 websites with a free host i want to get a better host but my website has some problems i need a javascript to add to a code that is a iframe that you can refresh but i need it were to refresh the iframe you can hit enter to refresh ONLY the iframe what can i add to the code to make it be able to refresh by hitting enter i am using iweb to make my website and also with that code how can i make my own button instead of the button on the code TO SEE HOW THE CODE WORKS save it in notpad or textedit PLEASE HELP IF YOU CAN JUST EDIT THE CODE TO MAKE IT bassicaly hyperlink the next button so i can hit enter to refresh/activate the refresh button with out using mouse PLEASE HELP THANK YOU
    html>
    <head>
    <script type="text/javascript">
    function Reload () {
    var f = document.getElementById('iframe1');
    f.src = f.src;
    }
    </script>
    </head>
    <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><iframe name="iframe1" id="iframe1" height="550" width="550" src="http://www.google.com/"></iframe></td>
    ]
    <td><input name="button1" type="button" onClick="Reload();" value="NEXT"> </td>
    </body>
    </html>

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Quote Originally Posted by preston bolo, post: 207554
    i am new to javascript i have 2 websites with a free host i want to get a better host but my website has some problems i need a javascript to add to a code that is a iframe that you can refresh but i need it were to refresh the iframe you can hit enter to refresh ONLY the iframe what can i add to the code to make it be able to refresh by hitting enter i am using iweb to make my website and also with that code how can i make my own button instead of the button on the code TO SEE HOW THE CODE WORKS save it in notpad or textedit PLEASE HELP IF YOU CAN JUST EDIT THE CODE TO MAKE IT bassicaly hyperlink the next button so i can hit enter to refresh/activate the refresh button with out using mouse PLEASE HELP THANK YOU
    html>
    <head>
    <script type="text/javascript">
    function Reload () {
    var f = document.getElementById('iframe1');
    f.src = f.src;
    }
    </script>
    </head>
    <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><iframe name="iframe1" id="iframe1" height="550" width="550" src="http://www.google.com/"></iframe></td>
    ]
    <td><input name="button1" type="button" onClick="Reload();" value="NEXT"> </td>
    </body>
    </html>
    Please use some punctuation in your posts. I can't understand what you're asking. It sounds as if you are asking someone to write code for you? Is this right?
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    Quote Originally Posted by AlphaMare, post: 207558
    Please use some punctuation in your posts. I can't understand what you're asking. It sounds as if you are asking someone to write code for you? Is this right?
    Ok im sorry yes i am asking for a code. Kinda if you could alter my code or add another line of code to automaticly afterthe refresh to be able to just click enter to refresh the iframe instead of having to click the mouse every second . Or tell me how to alter it myself i so instead of having to click refresh on my iframe. You could click enter. To refresh THE IFRAME ONLY BY CLICKING ENTER KEY do you understand? please help

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Wait...do you want the code to refresh every second on the dot, or do you want it when someone clicks the enter key? Because you can have the iframe refresh every second without any user interaction at all, and even though you're asking for two different things, this sounds to me like it's ultimately what you're after.

    If this is what you want, then do this:
    Code:
    <body onload="setInterval('Reload ()', 1000);">
    The 1000 represents your time in milliseconds.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I'm not going to alter it for you. You got this far, so you're going to be better off going all the way with it yourself if you can.

    But what I will try and do is point you in the right direction by giving you a concept.

    http://www.cs.tut.fi/~jkorpela/forms/enter.html <-- how to use ENTER onkeypress (which is the Javascript event handler you want).
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    Quote Originally Posted by TheGAME1264, post: 207591
    Wait...do you want the code to refresh every second on the dot, or do you want it when someone clicks the enter key? Because you can have the iframe refresh every second without any user interaction at all, and even though you're asking for two different things, this sounds to me like it's ultimately what you're after.

    If this is what you want, then do this:
    no i want it were when somone hits enter it will refresh the iframe only what can i add to make MY code refresh my iframe when somone clicks enter

  8. #7
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    Quote Originally Posted by TheGAME1264, post: 207596
    I'm not going to alter it for you. You got this far, so you're going to be better off going all the way with it yourself if you can.

    But what I will try and do is point you in the right direction by giving you a concept.

    http://www.cs.tut.fi/~jkorpela/forms/enter.html <-- how to use ENTER onkeypress (which is the Javascript event handler you want).
    but where do you put that code on my code i want it to be keypress

  9. #8
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    i dont know were to put that code i want it to be by click or keypress but like i said im new i dont know were to put the code u gave me and i want it to be by clicking enter

  10. #9
    Member
    Join Date
    Jun 2011
    Posts
    85
    Member #
    28034
    ok no one understands i need my code altered so that somone can PHYSICALLY click the button enter to make my iframe that has a refresh button on the iframe refresh by clicking enter

    or if you guys have a whole diffrent iframe where you can click enter to refresh it then ill take that also
    I KNOW VERY LITTLE ABOUT JAVASCRIPT
    i use iweb to design
    please help

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Again, this is where you really have to learn this for yourself. The only way you're going to get better at coding is to actually alter the code, see how far you can get, and then ask for help with the rest, showing us that you've actually made the effort to make the changes we suggest.

    No one's just going to code something for you. You won't learn, and we're not going to get anything out of it. No one wins in that scenario.

    So you can either show us what you've done, show us where you've made the changes that I've suggested, show that you've at least tried to implement something, and we'll help you...or you can take your ball and go home. Choice is yours.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 2 1 2 LastLast

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 05:45 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com