Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2004, 06:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default java script support htm page?

I use the image hyperlink


<FORM name="SearchForm" method="post" action="http://localhost/oracle/default.htm">
<P>

<INPUT name=search id=search ><A href="javascript:document.SearchForm.submit()"><im g src="http://localhost/oracle/Search_.gif"></A>

above linke don't display the htm page.

when I use
<FORM name="SearchForm" method="post" action="http://localhost/oracle/default.asp"> then it display the
default.asp page

how can use java script that it also display the htm page ?

regards.

Mateen







Reply With Quote
  #2 (permalink)  
Old June 30th, 2004, 07:19 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You cannot use html page as action, because .html are static pages.

To acheive the stated task, you have to use

<a href="http://localhost/oracle/default.htm">Default.asp</a>


Om Prakash
Reply With Quote
  #3 (permalink)  
Old June 30th, 2004, 07:47 AM
Registered User
 
Join Date: Jun 2004
Location: Hyderabad, A.P, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi i tried with the following code,
it is working even for .htm also.
Please check

Cheers
Murthy



<html>
<body>
<FORM name="SearchForm" method="post" action="http://localhost:8080/practice/html/aa.htm">
<P>

<INPUT name=search id=search ><A href="javascript:document.SearchForm.submit()"><im g
 src="http://localhost/oracle/Search_.gif"></A>
</body>
</html>


Reply With Quote
  #4 (permalink)  
Old June 30th, 2004, 08:33 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mateen,

It shouldn't matter whether the action attribute contains an htm / asp or other kind of page.

Out of interest, is there a reason why you can't use:

Code:
<input type="image" src="http://localhost/oracle/Search_.gif" />
in place of

Code:
<A href="javascript:document.SearchForm.submit()"><img src="http://localhost/oracle/Search_.gif"></A>
Best regards,

Chris

Reply With Quote
  #5 (permalink)  
Old June 30th, 2004, 09:10 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Submiting need Script & href doesnt accept script.
to submit ur Form using a <A> u should call submit it in OnClick of ur Image like:
Code:
<INPUT name=search id=search ><A href="void(0)" OnClick="document.SearchForm.submit();"><img src="http://localhost/oracle/Search_.gif"></A>
INSTEAD of:
Code:
<INPUT name=search id=search ><A href="javascript:document.SearchForm.submit()"><img src="http://localhost/oracle/Search_.gif"></A>

Hey somebody correct me if im wrong! (I didnt check it myself)

Always:),
Hovik Melkomian.
Reply With Quote
  #6 (permalink)  
Old June 30th, 2004, 09:16 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Melvik,

I believe that either method would work.

However, I'm in agreement with Chris. His method would probably be the easiest.

Also, I'm seeing some missing closing form tags.... :-) (</form>)

HTH,

Snib

<><
Reply With Quote
  #7 (permalink)  
Old June 30th, 2004, 09:54 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

SURE its easier & better, Did I say anything wrong about it?!
& also I didnt mentioned Prakash post that says u
Quote:
quote:can not set ur action to a HTML page
NO u DO can do it!

Always:),
Hovik Melkomian.
Reply With Quote
  #8 (permalink)  
Old June 30th, 2004, 10:05 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Just a Query:
What is the use of setting action as HTM page..

Like this one below:

<FORM name="SearchForm" method="post" action="http://localhost/oracle/default.htm">


Om Prakash
Reply With Quote
  #9 (permalink)  
Old July 1st, 2004, 12:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks to all response.

it is working.(move to htm page)

<INPUT name=search id=search><A href="http://localhost/oracle/default.htm" OnClick="document.SearchForm.submit();"><img src="http://localhost/oracle/Search_.gif"></A>

regards.

Mateen



Reply With Quote
  #10 (permalink)  
Old July 1st, 2004, 07:31 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

om_prakash:

It is possible to have a server parse .htm/.html pages with certain settings.

For instance, using Apache's AddType statement you can parse HTML with PHP.

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html

HTH,

Snib

<><
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Page and Content Page with Java script Harjinder ASP.NET 2.0 Professional 1 February 1st, 2008 10:31 AM
Transformation htm of page in rss Serjio RSS and Atom 0 August 6th, 2006 02:14 AM
How to keep url end w/ index.htm when page change bekim HTML Code Clinic 3 January 25th, 2005 05:00 PM
does visual C++ support SQL script davidwong Visual C++ 1 August 17th, 2004 02:30 AM



All times are GMT -4. The time now is 07:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.