www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] Onclick show in iframe

  1. #1
    Join Date
    Jun 2012
    Posts
    48

    resolved [RESOLVED] Onclick show in iframe

    Hello all,

    I have a search engine on my website but I can't get the onclick event show the search results in an iframe.
    The search code is
    Code:
    <form name="form" action="">
    <input type="text" class="search" name="search" size="30" /><br /><br />
    <input type="button" class="rounded-button" value="Search" 
     onclick='window.location.assign(document.URL.substring(0,document.URL.indexOf("?")), + "?search=" + document.form.search.value.replace(/ /g,"%20"))' />
    </form>
    The code of my iframe is
    Code:
    <iframe src="intro.php" name="inline_frame" id="inline_frame" width="100%" height="100%"  frameborder="0" marginwidth="0" scrolling="no" >
    The problem is that the search results show underneath the search box on the same page as the search button but I want to show them in an iframe of my website.
    So I have to give the location of the iframe in the onclick even because target=”inline frame” in the form tag doesn’t work.

    I don’t know how and where to add it in the onclick event.

    Somebody knows how to add the target --> inline_frame into the onclick event?

    Thanks for reading and I hope somebody can help me.
    Regards

  2. #2
    Join Date
    Jun 2012
    Posts
    48
    Problem solved ...

    I removed the onclick and used a php code in the action of the form

    Regards

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles