Yahoo! search interface: Difference between revisions

Content added Content deleted
m (→‎Icon and {{header|Unicon}}: indicate output truncated)
Line 838: Line 838:
puts
puts
end</lang>
end</lang>

=={{header|Run BASIC}}==
<lang runbasic>'--------------------------------------------------------------------------
' send this from the server to the clients browser
'--------------------------------------------------------------------------
html "<table border=1 cellpadding=0 cellspacing=0 bgcolor=wheat>"
html "<tr><td align=center colspan=2>Yahoo Search</td></tr>"
html "<tr><td align=right>Find</td><td>"
textbox #find,findThis$,30

html "</td></tr><tr><td align=right>Page</td><td>"
textbox #page,findPage$,2

html "</td></tr><tr><td align=center colspan=2>"
button #s, "Search", [search]
html " "
button #ex, "Exit", [exit]

html "</td><td></td></tr></table>"
wait

'--------------------------------------------------------------------------
' get search stuff from the clients browser
'--------------------------------------------------------------------------
[search]
findThis$ = trim$(#find contents$())
findPage$ = trim$(#page contents$())
findPage = max(val(findPage$),1) ' must be at least 1

'--------------------------------------------------------------------------
' sho page but keep user interface at the top by not clearing the page (cls)
' so they can change the search or page
' -------------------------------------------------------------------------
url$ = "http://search.yahoo.com/search?p=";findThis$;"&b=";((findPage - 1) * 10) + 1
html httpget$(url$)
wait

[exit]
cls ' clear browser screen and get outta here
wait</lang>


=={{header|Tcl}}==
=={{header|Tcl}}==