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.

Results 1 to 3 of 3
  1. #1
    Member web101's Avatar
    Join Date
    Jan 2009
    Posts
    74
    Member #
    18165
    Hey guys, more questions! So I have this code..

    function fl(){
    document.getElementById('states').innerHTML = 'FL';
    }

    Which is called when you click on a state. Anyways, is it possible for me to include parentesis inside that? Like this..

    function fl(){
    document.getElementById('states').innerHTML = 'Florida is a cool state. I hope you'll stay here.';
    }

    So it doesn't work for me right now, but is there something I can put in that will allow it to work?

  2.  

  3. #2
    Member web101's Avatar
    Join Date
    Jan 2009
    Posts
    74
    Member #
    18165
    So what do I need to do?

  4. #3
    Member J Dot's Avatar
    Join Date
    Feb 2005
    Location
    Brisbane, Australia
    Posts
    30
    Member #
    9088
    You need to escape the ' so that javascript recognises it as a single apostrophe instead of the end of the string.

    Try putting in two apostrophes - ''


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