<div dir="ltr">Am using drupal 5.7<br><br>i created the custom events display,<br><br>in that i added the search event ,<br><br>for that search , i written the validation , <br><br>I include the JS file,...<br>in the top of the search form,<br>
<br>But no use...<br><br>drupal_add_js("event_search.js")<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">strSearch = "";</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> for(i=0;i<arrSearch.length;i++){</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> strSearch+=arrSearch[i]+"+";</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> }</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> if(strSearch!=""){</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> strSearch = strSearch.substr(0,(strSearch.length-1));</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> //alert(strSearch);</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> }</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> window.location.href="/site1/?q=search/node/event/"+strSearch; return false;}</script>';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '<form action="/</span><span style="color: rgb(102, 102, 102);">site1</span><span style="color: rgb(102, 102, 102);">/?q=search/node/event" name="frm_search_event" accept-charset="UTF-8" method="post" id="search-form" class="search-form" onsubmit="return event_search_validation();">';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '<div><div class="form-item">';</span><br style="color: rgb(102, 102, 102);"><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> $block['content'].= '<div class="container-inline" style="margin-right:100px;"><div class="form-item">';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '<input type="text" maxlength="255" name="keys" id="edit-keys" name="txt_search_event" size="25" value="" class="form-text"/>';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '</div>';</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> $block['content'].= '<input type="image" src="files/images/btn-search-events.jpg" align="middle" width="96" height="21 name="ops" id="edit-submits" value="Events Search" class="form-submit" onClick="javascript:return goToEventSearch();" />';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '</div>';</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"> $block['content'].= '</div>';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '<input type="hidden" name="form_token" id="edit-search-form-form-token" value="29ae915e9bd7e3eb6d8a484b7095fed5" />';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '<input type="hidden" name="form_id" id="edit-search-form" value="search_form" />';</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);"> $block['content'].= '</div></form>';</span><br><br>Thanks u<br><br> <br><br><br><br><br><div class="gmail_quote">On Fri, Aug 1, 2008 at 11:56 AM, <span dir="ltr"><<a href="mailto:rolf@openusource.com">rolf@openusource.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
That's the way to do it!<br>
<br>
>From which file do you call drupal_add_js? Make sure that the PHP file is<br>
part of your running installation.<br>
<br>
Which version of drupal are you using?<br>
<br>
Regards,<br>
Rolfington<br>
<div><div></div><div class="Wj3C7c"><br>
> Hi<br>
><br>
><br>
> How to include the JS file ,<br>
><br>
> I tried drupal_add_js ,<br>
><br>
> but file not included<br>
><br>
> Any idea<br>
</div></div>> --<br>
> [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
<font color="#888888"><br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br></div>