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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submit to other submit page which submits too and load

    Is it possible to use javascript to submit from page#1 to another page#2 which submits to the iframe within and then load page#2 with submitted results ?

    Page#1 search form:
    <form id="SearchForm" action="http://itmjobs.ro/search-results-jobs/" target="" method="post">
    <input type="hidden" name="action" value="search" />
    <input type="hidden" name="listing_type[equal]" value="Job" />
    <label><strong>What?</strong>
    <em>
    <input type="text" value="job title, keywords or company name"
    onblur="if(this.value=='') this.value='job title, keywords or company name'"
    onFocus="if(this.value =='job title, keywords or company name' ) this.value=''" name="keywords [all_words]" />

    </em></label>




    <label><strong class="color">Where?</strong><b><input type="text" value="city, state or zip code"
    onblur="if(this.value=='') this.value='city, state or zip code'" onFocus="if(this.value =='city, state or zip code' ) this.value=''" name="City[all_words]" /></b></label>


    <a href="#" class="SearchForm-link" onclick="document.getElementById('SearchForm').submit()"/>Search</a></form>



    Page#2



    <form id="SearchForm" action="http://itmjobs.ro/search-results-jobs/" target="my-iframe" method="post">
    <input type="hidden" name="action" value="search" />
    <input type="hidden" name="listing_type[equal]" value="Job" />
    <label><strong>What?</strong>
    <em>
    <input type="text" value="job title, keywords or company name"
    onblur="if(this.value=='') this.value='job title, keywords or company name'"
    onFocus="if(this.value =='job title, keywords or company name' ) this.value=''" name="keywords[all_words]" />

    </em></label>

    <label><strong class="color">Where?</strong><b><input type="text" value="city, state or zip code"
    onblur="if(this.value=='') this.value='city, state or zip code'" onFocus="if(this.value =='city, state or zip code' ) this.value=''" name="City[all_words]" /></b></label>
    <a href="#" class="SearchForm-link" onclick="one(); two(); three(); four();">Search</a>
    <input type="submit" id="btn-search" class="button" value="Cauta"/></form>

    <iframe id="my-iframe" name="my-iframe" align="right" src="http://itmjobs.ro/" frameborder="0" height="100%" scrolling="no" width="100%"></iframe>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    This is a very bad functional design. What exactly are you trying to achieve?

    Besides, you should never rely on JavaScript for a site to function. JS should generally be used to enhance an already working website.

  • #3
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I have home page which has a nice design with 2 search boxes . When people complete the 2 boxes I need new page to load mypage.com/search.html which will receive form in iframe within and post results. Page 2 already has a parent page with search option which search in iframe and works really nice. The thing is that I need to people to be able to search in home page and load page2 with iframe results.


  •  

    Posting Permissions

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