Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The advanced research page
#1
In the advanced research page, I'd like to a textarea field the "Search for" input data field instead.
The keywords input in this textarea field, I'd like to put from Keywords textarea of keywords kontener (i.e. Edit document, used "predefined keywords" link, in the "out.KeywordChooser.php").

I organised this, but the keywords don't transfer between the two textarea.

What do I write the program "out.SearchForm.php" on space: XXXXXXXX ?


<td><?php printMLText("search_query");?>:</td>
<td class="inputDescription"><textarea name="query" rows="2" cols="30"> XXXXXXX </textarea><br>
<a href="javascript:chooseKeywords();"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords() {
openDlg = open("out.KeywordChooser.php", "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>

THANKS (sorry for my poor english): VPeter
Reply
#2
(06-09-2011, 03:55 AM)VPeter Wrote: In the advanced research page, I'd like to a textarea field the "Search for" input data field instead.
The keywords input in this textarea field, I'd like to put from Keywords textarea of keywords kontener (i.e. Edit document, used "predefined keywords" link, in the "out.KeywordChooser.php").

I organised this, but the keywords don't transfer between the two textarea.

What do I write the program "out.SearchForm.php" on space: XXXXXXXX ?


<td><?php printMLText("search_query");?>:</td>
<td class="inputDescription"><textarea name="query" rows="2" cols="30"> XXXXXXX </textarea><br>
<a href="javascript:chooseKeywords();"><?php printMLText("use_default_keywords");?></a>
<script language="JavaScript">
var openDlg;
function chooseKeywords() {
openDlg = open("out.KeywordChooser.php", "openDlg", "width=500,height=400,scrollbars=yes,resizable=yes");
}
</script>
</td>

THANKS (sorry for my poor english): VPeter

I like your idea. So i implemented this feature for my use too. The problem in getting information from Keywords form is that it send information to "keywords" variable in out.KeywordChooser.php.
Quote:var targetObj = opener.document.form1.keywords;

So i add a new variable to out.KeywordChooser.php
Quote:var targetObj2 = opener.document.form1.query;
And change acceptKeywords function in out.KeywordChooser.php
Quote:function acceptKeywords() {
if (typeof targetObj != "undefined") {
targetObj.value = myTA.value;
}
if (typeof targetObj2 != "undefined") {
targetObj2.value = myTA.value;
}
window.close();
return true;
}

Now search form looks like this
[ATTACHMENT NOT FOUND]
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply
#3
Hi Kotikov_A , first of all very THANKS for your help.

But, there is only a small fly in the ointment.
when I klikk to link "use predefined keyword", in the program "out.SearchForm.php" ,
then in the Keywords Textarea of keywords kontener of program "out.KeywordChooser.php" to get a value of "1" character (see pic below).

[Image: pre_key.jpg]

Probably from below command line, in the program "out.SearchForm.php", (I am testing it):
<li class="first"><input type="Checkbox" id="keywords" name="searchin[]" value="1"><label for="keywords"><?php printMLText("keywords");?></label></li>

By yours also?
What can be done about it?

Thanks VPeter.
Reply
#4
(06-11-2011, 04:50 PM)VPeter Wrote: Hi Kotikov_A , first of all very THANKS for your help.

But, there is only a small fly in the ointment.
when I klikk to link "use predefined keyword", in the program "out.SearchForm.php" ,
then in the Keywords Textarea of keywords kontener of program "out.KeywordChooser.php" to get a value of "1" character (see pic below).

[Image: pre_key.jpg]

Probably from below command line, in the program "out.SearchForm.php", (I am testing it):
<li class="first"><input type="Checkbox" id="keywords" name="searchin[]" value="1"><label for="keywords"><?php printMLText("keywords");?></label></li>

By yours also?
What can be done about it?

Thanks VPeter.

Oh, i forget to tell you about that ))) You need to change id of checkbox in out.SearchForm.php
Quote:<input type="Checkbox" id="keywords" name="searchin[]" value="1">
to some other name, for example, seachKeywords.
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply
#5
Oh, i forget to tell you about that ))) You need to change id of checkbox in out.SearchForm.php
Quote:<input type="Checkbox" id="keywords" name="searchin[]" value="1">
to some other name, for example, seachKeywords.
[/quote]

It's all right, thank you very much again, VP.
Reply
#6
The discussion motivated me to put this into the next release. I already extended
out.KeywordChooser.php by a parameter 'target', which holds the name of the form field receiving the selected keywords.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)