Results 1 to 5 of 5

Thread: [RESOLVED] Post form to default browser

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Resolved [RESOLVED] Post form to default browser

    First let me startby saying Ihavnt touched vb since vb6, now on 2012..
    I have a simple form that I want to POST to my website.(edit: I already can search from the browser this may be simpler)

    it will be a search box basically. It only has a TextBox and a ComboBox and obviously a search button.

    Right now I'd like something like this, but it is obviously not working
    Code:
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    
            System.Diagnostics.Process.Start("https://'TextBox1'.'ComboBox1'")
    
    
        End Sub
    (doesnt work like php >.<)
    This does open the default browser, but not passing the variables


    Any help would be great.

    Geez, seems like its imposible - getting no replys..

    heres the form on my site.. maybe that will show you what it is im trying to accomplish
    Code:
    <form onsubmit="PostForm('checkdomain', 'indexform')" id="indexform" action="https://4fd.us/cart.php?a=add&amp;pid=2" method="post">
    <input type="hidden" name="command" id="command">
    <input type="hidden" name="reg" value="1"><input type="text" name="sld" id="sld" class="styledfield" autocomplete="off" onblur="clearText(this)" onfocus="clearText(this)" value="Your-Name"><select name="tld" id="tld" class="domainselect1">
    <option style="margin-top: 5px; padding: 5px;" value="4fd.us">.4fd.us</option><option style="margin-top: 5px; padding: 5px;" value="4fd.in">.4fd.in</option><option style="margin-top: 5px; padding: 5px;" value="4fd.biz">.4fd.biz</option><option style="margin-top: 5px; padding: 5px;" value="4fd.org">.4fd.org</option><option style="margin-top: 5px; padding: 5px;" value="4fd.info">.4fd.info</option></select><input type="submit" name="checkButton" value="Check Availability" class="checkbutton" /></form>
    Last edited by mknjhill; Jan 17th, 2015 at 11:26 PM. Reason: show example

  2. #2
    Fanatic Member
    Join Date
    Oct 2011
    Location
    Sydney, Australia
    Posts
    756

    Re: Post form to default browser

    do you want it to submit the form or simply pass variables to a PHP script using GET?
    My CodeBank Submissions
    • Listbox with transparency and picture support - Click Here
    • Check for a true internet connection - Click Here
    • Open Cash drawer connected to receipt printer - Click Here
    • Custom color and size border around form - Click Here
    • Upload file to website without user logins, includes PHP - Click Here
    • List All Removable USB Storage Devices - Click Here
    • Custom On/Off Slide Control - Click Here
    • Insert multiple rows of data into one database table using parameters - Click Here
    • Trigger USB/Serial Cash Drawer - Click Here

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Re: Post form to default browser

    if it could just pass the variables to the address bar it would do what i want it to.

    so for example if 'bob' was typed in to the box(textbox1) and '4fd.us' was selected from the combo(combobox1) the window would open like:
    Code:
     System.Diagnostics.Process.Start("https://bob.4fd.us")

  4. #4
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,254

    Re: Post form to default browser

    Quote Originally Posted by mknjhill View Post
    if it could just pass the variables to the address bar it would do what i want it to.

    so for example if 'bob' was typed in to the box(textbox1) and '4fd.us' was selected from the combo(combobox1) the window would open like:
    Code:
     System.Diagnostics.Process.Start("https://bob.4fd.us")


    If you mean join the strings?..

    System.Diagnostics.Process.Start("https://" & textbox1.Text & "." & combobox1.Text)

    Concatenation Operators in Visual Basic
    http://msdn.microsoft.com/en-us/library/te2585xw.aspx

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Re: Post form to default browser

    I'll give that a shot. I tried something similar in the first post but I didnt have the '&'s in it.. thanks for the reply

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width