I got a < option value="between" >is between< /option > on my search page. the field that it's searching is an integer.
If I wanted to search between 100 and 120, what do you type into the text field??
'100 and 120' or '100 & 120' or ????
I mean, I have never used one of these fields before. (with all my technical knowledge that's really weird).
Once somebody can tell, I will know for sure if I have just been missing this knowledge before, or I have been doing right and getting the errors I am getting for a reason.
'100 and 120' would work. I think '100 120' would work too. The idea is to use natural language/format, though it'd be better if it could have two fields there.
Sorry david, not sure of the answer myself, but I think it's a good question. I'm sure it's easy, but not aware of the coding structure.
I've used "is greater than" before, but I can see a practical application for your query.
Especially if you wanted to search for members who posted between a certain number of forum, link or comment posts. Maybe useful for searching zip codes, phone area codes, age or signup dates, ect...
When you put two identical fields in a forum, the rules of html mean one of them will be ignored. I can't see what you're trying to do. If you're trying to do a 'between' search, do it like the existing ones do instead of inventing a new random way to break the rules of html forms.
It shouldn't work, you're duplicating the same names twice so surely the form can only process one of them... not to mention you have the odd spaces that i'd think would make it invalid html. A "between" search would simply be
exactly like the "between" searches already in the default advanced search template (except replacing the selector with the hidden input as you seem to want).
You are right, I thought I saw it picking up both values.
In that case, let me elaborate, so you can see that this is could be something to add in a future version. I am running a site in another language. I cannot ask the visitor to literally enter the 'and' between 2 values in that single text field. Also, I don't have (can't have) space around this text field to explain to the visitor: "please enter two numbers here, the minimum and maximum values, and be sure to leave a space between the 2 numbers."
See my point?
There should be a simple way to have 2 text fields, where they can enter the min. and max. values for a search condition (integer type).
In the meantime, any other way to solve this issue (in case you will put something like this in a future version)?
I presume that should be value = (without duplication).
Anyhow what I'd need to make it useful for the search page is a way to have a second box suddenly appear when someone selects 'between' from the search options. Not sure about the javascript for that.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Really stupid question
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hey everybody,
Probably the worst question of my life.
I got a < option value="between" >is between< /option >
on my search page. the field that it's searching is an integer.
If I wanted to search between 100 and 120, what do you type into the text field??
'100 and 120'
or
'100 & 120'
or ????
I mean, I have never used one of these fields before. (with all my technical knowledge that's really weird).
Once somebody can tell, I will know for sure if I have just been missing this knowledge before, or I have been doing right and getting the errors I am getting for a reason.
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
'100 and 120' would work. I think '100 120' would work too. The idea is to use natural language/format, though it'd be better if it could have two fields there.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hey Paul,
Hate to re-open this.
< input type="hidden" name="whatevercondition" value="between" / >
< input type="text" name="whateversearch" / >
< input type="text" name="whateversearch" / >
doesn't work. No errors, but it only uses the second input field for searching.
I tried
< input type="hidden" name="whatevercondition" value="<" / >
< input type="text" name="whateversearch" / >
<input type="hidden" name="whatevercondition" value=">" />
< input type="text" name="whateversearch" / >
Still nothing.
What do I have to do to have 2 text fields for the Minimum and Maximum of a search field value?
Thanks
David
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Anybody else using 2 text fields where you want to search between 2 numbers? How can you do this?
I cannot use a single text field and hope that people will enter the word 'and' between 2 numbers.
I even tried to put a
< input type="text" name="whateversearch" value="and" / >
between the 2 text fields, but nothing.
Thanks
David
Member
Usergroup: Customer
Joined: Jun 15, 2005
Location: Ontario, Canada
Total Topics: 7
Total Comments: 33
Sorry david, not sure of the answer myself, but I think it's a good question. I'm sure it's easy, but not aware of the coding structure.
I've used "is greater than" before, but I can see a practical application for your query.
Especially if you wanted to search for members who posted between a certain number of forum, link or comment posts. Maybe useful for searching zip codes, phone area codes, age or signup dates, ect...
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
But did you also use a 'is lower than' for the same searchcondition?
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
When you put two identical fields in a forum, the rules of html mean one of them will be ignored. I can't see what you're trying to do. If you're trying to do a 'between' search, do it like the existing ones do instead of inventing a new random way to break the rules of html forms.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hey Paul,
Apperently this works:
< input type="hidden" name="whatevercondition" value="<" / >
< input type="text" name="whateversearch" / >
<input type="hidden" name="whatevercondition" value=">" />
< input type="text" name="whateversearch" / >
No idea why it didn't work before.
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It shouldn't work, you're duplicating the same names twice so surely the form can only process one of them... not to mention you have the odd spaces that i'd think would make it invalid html. A "between" search would simply be
<input type="hidden" name="whatevercondition" value="between">
<input type="text" size="{STANDARDSIZE}" name="whateversearch">
exactly like the "between" searches already in the default advanced search template (except replacing the selector with the hidden input as you seem to want).
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
You are right, I thought I saw it picking up both values.
In that case, let me elaborate, so you can see that this is could be something to add in a future version. I am running a site in another language. I cannot ask the visitor to literally enter the 'and' between 2 values in that single text field. Also, I don't have (can't have) space around this text field to explain to the visitor:
"please enter two numbers here, the minimum and maximum values, and be sure to leave a space between the 2 numbers."
See my point?
There should be a simple way to have 2 text fields, where they can enter the min. and max. values for a search condition (integer type).
In the meantime, any other way to solve this issue (in case you will put something like this in a future version)?
Thanks
David
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Here is a temporary solution that relies on Javascript.
<input style="width:45px" type="text" id="armin" value="" /> és
<input style="width:45px" type="text" id="armax" value="" />
<input type="hidden" name="arcondition" value="between">
<input type="hidden" name="arsearch" value="between">
<script type="text/javascript">
function copyar() {
if (document.getElementById('armin').value&&document.getElementById('armax').value) {
document.getElementById('arsearch').value=value=document.getElementById('armin').value + ' ' + document.getElementById('armax').value
}
}
</script>
<input type="submit" value="Search" onmouseover="copyar()" class="button" />
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Never mind. Even that doesn't work properly. AAARRGH.
Can we please have this function in the next upgrade? I can't really run my searches at all without such a min and max value for a search field.
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
value=valu e=
I presume that should be value = (without duplication).
Anyhow what I'd need to make it useful for the search page is a way to have a second box suddenly appear when someone selects 'between' from the search options. Not sure about the javascript for that.