/    Sign up×
Community /Pin to ProfileBookmark

Won’t swap text and images!!

Here is the problem and trust me it is complex.

First what I want my coding to do:

  • I need the image and text to change when an option from a dropdown list is changed. Here is the tricky part, there are two dropdown lists that could potentially change the text and images.

  • I also need the “nexturl” to correspond with the options that were selected when their form was submitted. So that would mean that 1of4 confirmation pages would be called.

  • Any help would be awesome.

    This is the page I am working with to test my findings and fiddlings.

    [url]http://www.alwaysinmyheartinc.com/HMRBROSE_test.htm[/url]

    And just to note, their should be more text to the right of the picture than their currently is, but that was cuased by my tweaking of code to try to swap text.

    Thank you in advance.

    ~Jay

    to post a comment
    JavaScript

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @SipherDrakonauthorJun 21.2007 — ok so it's been slow going.

    but here is what i have so far.

    This is my javascript for some of the functions.

    [CODE]
    function swap(source) {
    if (document.images) {
    document.images['myImage'].src = source;
    }
    }[/CODE]


    and this is the coding for the form I am trying to work with.

    [CODE]
    <FORM ACTION="http://us.2.p9.webhosting.yahoo.com/forms?login=vansawardsplus" METHOD="post" NAME="Personalize" onsubmit="return ValidateForm();">
    <INPUT TYPE="hidden" NAME="form" VALUE="contactpage">
    <INPUT NAME="Subject" TYPE="hidden" SIZE=32 VALUE="Additional Information for HMRBROSE">
    <INPUT NAME="Personalize" TYPE="checkbox" VALUE="No"> No Personalization&nbsp;
    <p>
    <input type="hidden" name="on0" value="Finish">
    <select onChange="swap(this.options[selectedIndex].value)" name="Finish" >
    <option value="images/hmrbroselrg.jpg">Select a Finish
    <option value="images/hmrbroselrg.jpg">Piano Finish
    <option value="images/hmrbroselrg3.jpg">Walnut Finish
    </select><br>
    <input type="hidden" name="on1" value="Style">
    <select onChange="swap(this.options[selectedIndex].value)" name="Style">
    <option value="images/hmrbroselrg.jpg">Select Wording Style
    <option value="images/hmrbroselrg2.jpg">Plate on Lid
    <option value="images/hmrbroselrg.jpg">Burned into Wood
    <input type="hidden" name="next_url" value="http://www.alwaysinmyheartinc.com/noform/HMRBROSE.htm">
    <p><i>Your Email Address:</i><font color=red>*&nbsp; </font>&nbsp;<INPUT NAME="Email_Address" TYPE="text" SIZE=20 VALUE="">&nbsp;&nbsp;
    <input type="submit" value="Submit" name="Submitted_Successfully"><input type="reset" value="Reset" name="B2"></p>
    </form>[/CODE]


    I figured out how to do the swap images, but i need the second dropdown menu to be contingent on the first.

    So if they picked walnut, the next dropdown list would result in only the pictures with a walnut box to be swapped in.

    I haven't even gotten to the swapping text. ??
    ×

    Success!

    Help @SipherDrakon spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.28,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...