Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Sending Images as Variables

    Well, I'm kind of new to Javascript. I was trying to do this in HTML, but I was pointed in the direction of Javascript.
    I've found multiple examples of variable sending, but I can't seem to find one that I can easily change to send an image.
    I've got image www.exampleimage.com/ex/image.png
    I want to send from examplesite.com/page.htm to examplesite.com/page2.htm
    I want to make the variable named AxeOfPrecision

    This may be a simple thing in Javascript, I don't know, but all help is appreciated.

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,371
    Thanks
    11
    Thanked 591 Times in 572 Posts
    you can link to the image from both pages, not sure why you would need to transfer any image data...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • #3
    New Coder
    Join Date
    Jan 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    What I want is to create a little virtual store. I'm starting small.
    I want one image to be sent from my store page to the users item storage. At the moment, I'm just working with one page. Sending from one page to the second page. I'll go more complex (account-checking), later on.
    So, by clicking example.com/item.png, I need it to go to myitems.com/storage.htm

  • #4
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Lightbulb

    In the HTML, try this:
    Code:
    <a href="myitems.com/storage.htm"><img src="example.com/item.png"></a>
    May need to expand the URL to include http://www.

  • #5
    New Coder
    Join Date
    Jan 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That will successfully take me to the page, I'm aware of that, but
    I need it to go to myitems.com/storage.htm
    I need the image to appear on the page.
    Also, as long as I'm on the variable subject, how about creating a points system?
    What variable approach would I take for that? With that one, I imagine I'll be able to figure out the recoding myself if you just point me in the right direction

  • #6
    New Coder
    Join Date
    Jan 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Bump. I just want to make sure you don't forget about me (I apologize for the double post)
    Okay, I got my points set up, but I do need a little help (probably a simple answer).
    How do I raise/lower my variable by clicking an image? I want to keep the the page the same.

  • #7
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Question More information needed ...

    Quote Originally Posted by LivingShadow View Post
    Bump. I just want to make sure you don't forget about me (I apologize for the double post)
    Okay, I got my points set up, but I do need a little help (probably a simple answer).
    How do I raise/lower my variable by clicking an image? I want to keep the the page the same.

    Post some code to comment on. No matter what we post will not solve your specific problem. Show what or where the problem is that you are asking about.

  • #8
    New Coder
    Join Date
    Jan 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry, I didn't realize that it would be confusing to understand.
    So, I've got this variable points. Here's the code:
    Code:
    Points: 
    <script type="text/javascript">
    var points = 0;
    document.write(points);
    </script>
    Now, I want to raise the variable 10 in value by clicking an image. How would I code that?
    Is that more clear?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •