AndyPSV
asked on
Jquery: alert() when submit with default value
how to put jquery script with message to change the default value for user (to the script below):
"<script>$(document).ready (function( ){
alert ("helloworld");
});</script>"
"<script>$(document).ready
alert ("helloworld");
});</script>"
<% if $display == 1 OR $_URL == $URL %>
<script>$(document).ready(function(){$("#search").click(function(){$("#search_form").slideToggle("slow")})});</script>
<script type="text/javascript">$(document).ready(function(){$("#bc").bind("change",function(){if(this.value=="1"){$("#c").attr("disabled",true)}else{$("#c").attr("disabled",false)}});$("#bc").change()});</script>
<div id=search_form class='clear rel pad-left1 window<% if $display_show == '' %> none<% /if %>'>
<form action=<% $URL %>catalogs/ method=GET name=searchform>
<script>jQuery(function($){$("#t").Watermark("search\u00A0<% include file = $TPLx.'bl/if_search/index2.html' %>","#ccc")});</script>
<input type=text name=t id=t size=54 />
<% if $_URL == $URL %>
<select name=bc id=bc class=cc>
<option value=''>– Select Category –</option>
<% foreach from = $bc key = k item = v %><option value=<% $bc[$k][id] %><% if $GET[bc] == $bc[$k][id] %> selected<% /if %>><% $bc[$k][t] %></option><% /foreach %>
</select>
<% /if %>
<select name=c id=c class=ccc<% if $_GET[0] == 'catalogs' OR $_GET[0] == '' %><% else %> disabled<% /if %>>
<option value=''>– <% if $_GET[0] == 'catalogs' OR $_GET[0] == '' %><% else %>All <% /if %><% include file = $TPLx.'bl/if_search/index.html' %> –</option>
<% foreach from = $c key = k item = v %><option value=<% $c[$k][id] %><% if $GET[c] == $c[$k][id] %> selected<% /if %>><% $c[$k][t] %></option><% /foreach %>
</select>
<a href=# onclick=document.searchform.submit(); class='fg-button button-small ui-state-default fg-button-icon-right ui-corner-all'>search</a> <a href=#>advanced search</a><br />
<span class='bold'>Your recent searches:</span> <span class=dsc>none</span> <a href=#>AA</a>, <a href=#>ethanol</a>
</form>
</div>
<% /if %>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
answer not needed, thanks btw
ASKER