How do I recollect my password?
Javascript question
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programming > Javascript question 1 July 2008 06:52:00

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Javascript question

Robin Kopetzky 1 July 2008 06:52:00
 I know this may be off-topic but I've got a problem that I do not know how
to work around...

I'm displaying a <SELECT> list and the problem is getting the value back
after an 'onChange' event. Code is like this:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIP­T">
<!--
function jump()
{
document.buttons.su­bmit();
}
-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFAB4" LEFTMARGIN="0" TOPMARGIN="0">
<FORM NAME="buttons" TARGET="buttons" ACTION="buttons.php­" METHOD="get">
<INPUT TYPE="hidden" NAME="pass" VALUE="1">
<CENTER>State</CENT­ER>
<CENTER>
<SELECT onChange="jump()">
<OPTION NAME="state_name" VALUE="Colorado">Co­lorado</OPTION>
<OPTION NAME="state_name" VALUE="New Mexico">New Mexico</OPTION>
</SELECT>
</CENTER>
</FORM>
<BODY>
</HTML>

I need to get the "state_name" back but all I get in the $_GET['state_name']
array is an empty value. Any clue as to why this won't work??

I don't want to use a 'Submit' button as this is very cumbersome when I add
the other 3 <SELECT> lists...

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Chris Murley 10 August 2000 05:21:18 permanent link ]
 

Has anyone written a php chat room? using a mysql databse ??


anyhow, can someone give me the javascript code to do a header/refresh
command/




i though it was somehting like



<script>
location.url=http:/­/www.newurl.com

</script>



can someone help me?

Add comment
Chris Murley 10 August 2000 05:35:10 permanent link ]
 thanks, but can you help with this...



do i really need the function? i am just \gonna call it in one place so
can i say:


<script language="JavaScrip­t">
window.location.hre­f="http://www.newurl­.com";
</script>


??? thanks!

On Wed, 9 Aug 2000, Christensen, BruceX R wrote:
Try: >
<script language="JavaScrip­t">> <!--> function refreshPage($newpag­e) {> window.location.hre­f=$newpage;> }> // -->> </script>>
--Bruce>
Bruce Christensen> Intel Corporation> brucex.r.christense­n@intel.com>
-----Original Message-----> From: Chris Murley [mailto:murley@appindex.net]> Sent: Wednesday, August 09, 2000 7:21 PM> To: [php]> Subject: [PHP] Java script question?>
Has anyone written a php chat room? using a mysql databse ??>
anyhow, can someone give me the javascript code to do a header/refresh> command/ >
i though it was somehting like>
<script>> location.url=http:/­/www.newurl.com>
</script>>
can someone help me?>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>

Add comment
BruceX R Christensen 10 August 2000 05:37:51 permanent link ]
 Try:

<script language="JavaScrip­t">
<!--
function refreshPage($newpag­e) {
window.location.hre­f=$newpage;
}
// -->
</script>

--Bruce

Bruce Christensen
Intel Corporation
brucex.r.christense­n@intel.com


-----Original Message-----
From: Chris Murley [mailto:murley@appindex.net]
Sent: Wednesday, August 09, 2000 7:21 PM
To: [php]
Subject: [PHP] Java script question?




Has anyone written a php chat room? using a mysql databse ??


anyhow, can someone give me the javascript code to do a header/refresh
command/




i though it was somehting like



<script>
location.url=http:/­/www.newurl.com

</script>



can someone help me?


--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net
For additional commands, e-mail: php-general-help@li­sts.php.net
To contact the list administrators, e-mail: php-list-admin@list­s.php.net


Add comment
Chris Murley 10 August 2000 05:40:47 permanent link ]
 thats works great, thanks!

On Wed, 9 Aug 2000, Christensen, BruceX R wrote:
Function's not necessary. Your way works fine.>
--Bruce>
Bruce Christensen> Intel Corporation> brucex.r.christense­n@intel.com>
-----Original Message-----> From: Chris Murley [mailto:murley@appindex.net]> Sent: Wednesday, August 09, 2000 7:35 PM> To: Christensen, BruceX R> Cc: [php]> Subject: RE: [PHP] Java script question?>
thanks, but can you help with this...>
do i really need the function? i am just \gonna call it in one place so> can i say:>
<script language="JavaScrip­t">> window.location.hre­f="http://www.newurl­.com";> </script>>
??? thanks!>
On Wed, 9 Aug 2000, Christensen, BruceX R wrote:>
Try: > >
<script language="JavaScrip­t">> > <!--> > function refreshPage($newpag­e) {> > window.location.hre­f=$newpage;> > }> > // -->> > </script>> >
--Bruce> >
Bruce Christensen> > Intel Corporation> > brucex.r.christense­n@intel.com> >
-----Original Message-----> > From: Chris Murley [mailto:murley@appindex.net]> > Sent: Wednesday, August 09, 2000 7:21 PM> > To: [php]> > Subject: [PHP] Java script question?> >
Has anyone written a php chat room? using a mysql databse ??> >
anyhow, can someone give me the javascript code to do a header/refresh> > command/ > >
i though it was somehting like> >
<script>> > location.url=http:/­/www.newurl.com> >
</script>> >
can someone help me?> >
-- > > PHP General Mailing List (http://www.php.net­/)> > To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> > For additional commands, e-mail: php-general-help@li­sts.php.net> > To contact the list administrators, e-mail: php-list-admin@list­s.php.net> >
-- > > PHP General Mailing List (http://www.php.net­/)> > To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> > For additional commands, e-mail: php-general-help@li­sts.php.net> > To contact the list administrators, e-mail: php-list-admin@list­s.php.net> >
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>

Add comment
BruceX R Christensen 10 August 2000 05:44:38 permanent link ]
 Function's not necessary. Your way works fine.

--Bruce

Bruce Christensen
Intel Corporation
brucex.r.christense­n@intel.com


-----Original Message-----
From: Chris Murley [mailto:murley@appindex.net]
Sent: Wednesday, August 09, 2000 7:35 PM
To: Christensen, BruceX R
Cc: [php]
Subject: RE: [PHP] Java script question?


thanks, but can you help with this...



do i really need the function? i am just \gonna call it in one place so
can i say:


<script language="JavaScrip­t">
window.location.hre­f="http://www.newurl­.com";
</script>


??? thanks!

On Wed, 9 Aug 2000, Christensen, BruceX R wrote:
Try: >
<script language="JavaScrip­t">> <!--> function refreshPage($newpag­e) {> window.location.hre­f=$newpage;> }> // -->> </script>>
--Bruce>
Bruce Christensen> Intel Corporation> brucex.r.christense­n@intel.com>
-----Original Message-----> From: Chris Murley [mailto:murley@appindex.net]> Sent: Wednesday, August 09, 2000 7:21 PM> To: [php]> Subject: [PHP] Java script question?>
Has anyone written a php chat room? using a mysql databse ??>
anyhow, can someone give me the javascript code to do a header/refresh> command/ >
i though it was somehting like>
<script>> location.url=http:/­/www.newurl.com>
</script>>
can someone help me?>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail: php-general-help@li­sts.php.net> To contact the list administrators, e-mail: php-list-admin@list­s.php.net>


--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net
For additional commands, e-mail: php-general-help@li­sts.php.net
To contact the list administrators, e-mail: php-list-admin@list­s.php.net


Add comment
Rosen 30 October 2001 11:50:42 permanent link ]
 Hi,
This is not a PHP question, but can someone help me
how to convert in lowercase the text into "INPUT" statment online ?
(i.e. when the user press a key , the script automaticly to convert char in
lowercase )

Thanks,
Rosen


Add comment
Fatih Ustundag 30 October 2001 11:55:51 permanent link ]
 <input type="text" value="" onKeyUp="this.value­=this.value.toLowerC­ase()">

-----Original Message-----
From: Rosen [mailto:rosen_dm@dir.bg]
Sent: Tuesday, October 30, 2001 9:51 AM
To: php-general@lists.p­hp.net
Subject: [PHP] Javascript question


Hi,
This is not a PHP question, but can someone help me
how to convert in lowercase the text into "INPUT" statment online ?
(i.e. when the user press a key , the script automaticly to convert char in
lowercase )

Thanks,
Rosen



--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, e-mail: php-general-unsubsc­ribe@lists.php.net
For additional commands, e-mail: php-general-help@li­sts.php.net
To contact the list administrators, e-mail: php-list-admin@list­s.php.net

Add comment
Christian Cresante 30 October 2001 11:57:23 permanent link ]
 hello. javascript has a toLowerCase() method.
just call this method using onsubmit.

--- Rosen <rosen_dm@dir.bg> wrote:> Hi,> This is not a PHP question, but can someone help me> how to convert in lowercase the text into "INPUT"> statment online ?> (i.e. when the user press a key , the script> automaticly to convert char in> lowercase )>
Thanks,> Rosen>
-- > PHP General Mailing List (http://www.php.net­/)> To unsubscribe, e-mail:> php-general-unsubsc­ribe@lists.php.net> For additional commands, e-mail:> php-general-help@li­sts.php.net> To contact the list administrators, e-mail:> php-list-admin@list­s.php.net>


___________________­____________________­___________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.ya­hoo.com
Add comment
Philip Jeffs 1 March 2002 15:41:02 permanent link ]
 Hi,

I know this is a PHP list but i thought someone might be able to help me out.

I was looking at the Levi's website the other day and i noticed a cool script on there for opening pop-ups. They have managed to get rid of the usual window borders altogether and it looks really good.

They have managed to do it by opening the pop-up window in full screen mode and then making the window smaller and positioning it in a certain place on screen.

I've figured out how to open it, shrink it and position it but for some reason i the scroll bars are always there. The levi's site has no scroll bars.

Does anyone know how to get rid of the scroll bars?

Thanks in advance,

Phil
Add comment
Sven Jacobs 1 March 2002 15:45:57 permanent link ]
 <script>
function openpopup(){
var popurl="url"
winpops=window.open­(popurl,"Solution","­width=500,height=400­,")
}
//openpopup()
</script>

<input type="submit" value="Escalations"­ onClick="openpopup(­)">

Kind Regards
Sven
-----Original Message-----
From: Philip Jeffs [mailto:mail@philipjeffs.com]
Sent: vendredi 1 mars 2002 12:41
To: PHP LIST
Subject: [PHP] Javascript question...


Hi,

I know this is a PHP list but i thought someone might be able to help me
out.

I was looking at the Levi's website the other day and i noticed a cool
script on there for opening pop-ups. They have managed to get rid of the
usual window borders altogether and it looks really good.

They have managed to do it by opening the pop-up window in full screen mode
and then making the window smaller and positioning it in a certain place on
screen.

I've figured out how to open it, shrink it and position it but for some
reason i the scroll bars are always there. The levi's site has no scroll
bars.

Does anyone know how to get rid of the scroll bars?

Thanks in advance,

Phil
Add comment
Mike Migurski 20 November 2003 21:43:47 permanent link ]
 
Ah-hah! Jason hides under an email address that does not exist so one>cannot reply directly to him, only via the list. Does that not describe>the person well?

Insofar as he is cautious about spam, sure.

-------------------­--------------------­--------------------­----------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.­com/contact.html

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Jay Blanchard 20 November 2003 21:49:16 permanent link ]
 [snip]
Ah-hah! Jason hides under an email address that does not exist so one
cannot
reply directly to him, only via the list. Does that not describe the
person
well?
[/snip]

I found Jason's reply to be humorous! You yourselef said that your
request was off topic. What did you expect? Here is something you may
want to read....

http://www.w3.org/T­R/html4/interact/scr­ipts.html#adef-oncha­nge

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
John Nichel 20 November 2003 22:02:50 permanent link ]
 Jason Wong wrote:> On Friday 21 November 2003 02:24, Robin Kopetzky wrote:>
I know this may be off-topic but I've got a problem that I do not know how>>to work around...>
Hey list moderators, can this list be renamed the > php-general-javascr­ipt-and-the-kitchen-­sink list?>

My kitchen sink always gets clogged when we clean out the fridge. Does
anyone know of a way I can fix that? ;)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.c­om

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Jay Blanchard 20 November 2003 22:05:37 permanent link ]
 [snip]
My kitchen sink always gets clogged when we clean out the fridge. Does
anyone know of a way I can fix that? ;)
[/snip]

$strSinkTrap = fopen("/under/the/c­abinet/", "w+");
while(!feof($strSin­kTrap)){
unscrewFittings($pi­pe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap­);

PHP rocks!

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
John Nichel 20 November 2003 22:08:16 permanent link ]
 Robin Kopetzky wrote:
Ah-hah! Jason hides under an email address that does not exist so one cannot> reply directly to him, only via the list. Does that not describe the person> well?>

Jason's actions describe him, not his email address. Jason is a valued
member of this list and has helped countless people with php problems.
This is a php list; asking a non-php question by mistake (not knowing
were the real problem lies, thinking it's a php issue, etc.) is one
thing, but you stated that your question was an offtopic JavaScript
question, so the responses you get should be expected. There are
numerous list for JS.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.c­om

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
John Nichel 20 November 2003 22:12:25 permanent link ]
 Jay Blanchard wrote:
[snip]> My kitchen sink always gets clogged when we clean out the fridge. Does> anyone know of a way I can fix that? ;)> [/snip]>
$strSinkTrap = fopen("/under/the/c­abinet/", "w+");> while(!feof($strSin­kTrap)){> unscrewFittings($pi­pe);> if($pipeUnscrewed == TRUE){> removeClog($hair, $grease, $grime);> }> }> fclose($strSinkTrap­);>
PHP rocks!>

Of course, now we're offtopic, but it's funny. That was great.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.c­om

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Aaron Gould 20 November 2003 22:18:48 permanent link ]
 
$strSinkTrap = fopen("/under/the/c­abinet/", "w+");> while(!feof($strSin­kTrap)){> unscrewFittings($pi­pe);> if($pipeUnscrewed == TRUE){> removeClog($hair, $grease, $grime);> }> }> fclose($strSinkTrap­);

You may want to call the screwFittings function after removeClog has
returned, or there's going to be an awful mess.

But then again, perhaps the automatic garbage collection will take care
of that?

--
Aaron Gould
Parts Canada - Web Developer

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Brent Baisley 20 November 2003 22:44:22 permanent link ]
 Funny off-off topic stuff. But to address the original question, which
I deleted already, the problem is in your html, not your javascript.
The syntax for selects is:
<select name="state_name" onChange="">
<option label="Colorado" value="Colorado">Co­lorado</option>

You had the "name" parameter in the option, not the select.

Now about unclogging drains...

On Nov 20, 2003, at 2:05 PM, Jason Wong wrote:
On Friday 21 November 2003 02:38, Robin Kopetzky wrote:>> Ah-hah! Jason hides under an email address that does not exist so one>> cannot reply directly to him, only via the list. Does that not >> describe the>> person well?>
My address only accepts mail directly from the list, cuts down on the > spam> somewhat. I hope you wasn't trying to spam me :)­>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.75­9.0577

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Andrew Tyrone 24 January 2005 21:38:06 permanent link ]
 
Can anyone tell me please what do question marks and colon > symbols signify in a javascript command? For example:>
F.value = S < 0 ? "?? " + F.value : (new Date(2000, 0, 1, > S[0], S[1])).USlocaltimeStr(­);>
My guess is that this is some kind of shorthand for an > if-then-else control structure, but I've never seen it > documented anywhere.

Your guess is right; it is analogous to IIF() in CFML.



~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=49

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:191556
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Micha Schopman 16 February 2005 21:55:19 permanent link ]
 I did some refactoring for you :)­ while loops in javascript are quicker than for loops.

function Validator() {
var myform = document.getElement­ById('SuggestionForm­');
var errMsg = ''
var checkboxcounter = 0;

if (myform.SuggestionT­ext.value.length <= 0){
errMsg += '- Please explain your suggestion.\n\r'
}

if (myform.SuggestTitl­e.value.value.length­ <= 0){
errMsg += '- Your suggestion needs a title.\n\r'
}

var i=myform.Impact.len­gth;while(i--){
if(myform.Impact[i].ch­ecked){
checkboxcounter++;
}
}

if (errMsg.length > 0) {
alert(errMsg)
}else{
myform.submit()
}

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:195061
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment


John Wilker 16 February 2005 22:13:32 permanent link ]
 I didn't know of a good JS list

I have the code below. The if loop seems to kill the script. The IF
loop runs fine but the alert after the FOR and everything after the
FOR for that matter, fail to execute.

function Validator() {
var myform = document.getElement­ById('SuggestionForm­');
var errMsg = ''
var checkboxcounter = 0
if (myform.SuggestionT­ext.value == '')
errMsg = errMsg + '- Please explain your suggestion.\n\r'
if (myform.SuggestTitl­e.value == '')
errMsg = errMsg + '- Your suggestion needs a title.\n\r'
alert(myform.Impact­.length);
for (i = 0; i <= myform.Impact.lengt­h; i++)
{
if (myform.Impact[i].chec­ked) {
alert('true');
checkboxcounter++;
}else{
alert('false');
}
}
alert('hi');
alert(checkboxcount­er);
if (errMsg != '')
alert(errMsg)
else
myform.submit()
}

Any thoughts.

--
John Wilker
Writer/Web Consultant
www.red-omega.com

"I balance, I weave, I dodge, I frolic, and my bills are all paid. On
weekends, to let off steam, I participate in full-contact origami."

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:195053
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Charlie Griefer 16 February 2005 22:27:53 permanent link ]
 change: for (i = 0; i <= myform.Impact.lengt­h; i++)
to: for (i = 0; i < myform.Impact.lengt­h; i++)


On Wed, 16 Feb 2005 11:13:32 -0800, John Wilker <john.wilker-Re5JQE­eQqe8AvxtiuMwx3w@pub­lic.gmane.org> wrote:> I didn't know of a good JS list>
I have the code below. The if loop seems to kill the script. The IF> loop runs fine but the alert after the FOR and everything after the> FOR for that matter, fail to execute.>
function Validator() {> var myform = document.getElement­ById('SuggestionForm­');> var errMsg = ''> var checkboxcounter = 0> if (myform.SuggestionT­ext.value == '')> errMsg = errMsg + '- Please explain your suggestion.\n\r'> if (myform.SuggestTitl­e.value == '')> errMsg = errMsg + '- Your suggestion needs a title.\n\r'> alert(myform.Impact­.length);> for (i = 0; i <= myform.Impact.lengt­h; i++)> {> if (myform.Impact[i].chec­ked) {> alert('true');> checkboxcounter++;>­ }else{> alert('false');> }> }> alert('hi');> alert(checkboxcount­er);> if (errMsg != '')> alert(errMsg)> else> myform.submit()> }>
Any thoughts.>
--> John Wilker> Writer/Web Consultant> www.red-omega.com>
"I balance, I weave, I dodge, I frolic, and my bills are all paid. On> weekends, to let off steam, I participate in full-contact origami.">

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=49

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:195057
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment


Jim Davis 16 February 2005 22:45:05 permanent link ]
 
-----Original Message-----> From: Charlie Griefer [mailto:charlie.griefer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]> Sent: Wednesday, February 16, 2005 2:28 PM> To: CF-Talk> Subject: Re: Javascript question>
change: for (i = 0; i <= myform.Impact.lengt­h; i++)> to: for (i = 0; i < myform.Impact.lengt­h; i++)

Yup - Charlie's 'xactly right. Remember that JavaScript counts from zero,
but "length" is still the full count. So you while length would be (for
example) "3" the actual count would be "0,1,2"

Jim Davis




~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:195059
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
John Wilker 16 February 2005 23:52:31 permanent link ]
 thank you gentlemen!!! The <= is no < and that worked perfectly.

I'm redesigning to use the while loop, thanks for that as well. Much obliged.

J


On Wed, 16 Feb 2005 14:55:19 -0400, Micha Schopman
<micha.schopman-/uP­+Z2yNvuJb59syV38YQQ@­public.gmane.org> wrote:> I did some refactoring for you :)­ while loops in javascript are quicker than for loops.>
function Validator() {> var myform = document.getElement­ById('SuggestionForm­');> var errMsg = ''> var checkboxcounter = 0;>
if (myform.SuggestionT­ext.value.length <= 0){> errMsg += '- Please explain your suggestion.\n\r'> }>
if (myform.SuggestTitl­e.value.value.length­ <= 0){> errMsg += '- Your suggestion needs a title.\n\r'> }>
var i=myform.Impact.len­gth;while(i--){> if(myform.Impact[i].ch­ecked){> checkboxcounter++;>­ }> }>
if (errMsg.length > 0) {> alert(errMsg)> }else{> myform.submit()> }>

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=49

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:195078
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment


MikeR 9 April 2005 20:07:13 permanent link ]
 Not an FP issue per se, but I hope someone can set me straight.
In an effort to get rid of hover buttons, I added a couple of .jpgs
(buttons) and got a JS rollover script from the net.
In FF:
When the page loads, I see the text from the alt tag. The button doesn't
show up until a mouseover, and then operates as expected.
In IE:
When the page loads, the boxed red 'X' shows. The button doesn't show up
until a mouseover, and then operates as expected.
The URL is nf4l.com
TIA
Mike
Add comment
Murray 9 April 2005 22:08:07 permanent link ]
 This is a bad start for your page -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/­TR/html4/loose.dtd">­

<HEAD>

You need an <html> tag up there, e.g.,

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/­TR/html4/loose.dtd">­
<html>
<HEAD>

This image is not on the server -

<IMG NAME="img1" SRC="mages/details_­off.jpg" ALT="Dx" HEIGHT="15"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0">

and so it doesn't appear when the page loads. Yet, this rollover -

<A HREF="dxdevil.htm" onMouseOver="imgOn(­'img1')"
onMouseOut="imgOff(­'img1')">

forces the correct image to load once the new image has been rolled in. You
need to correct the typo in the image's source link from "mages/..." to
"images/...".

You didn't need to go outside of FP to create these rollovers, you know?

--
Murray
============

"MikeR" <nf4l@pobox.com> wrote in message
news:uyX174RPFHA.24­8@TK2MSFTNGP15.phx.g­bl...> Not an FP issue per se, but I hope someone can set me straight.> In an effort to get rid of hover buttons, I added a couple of .jpgs > (buttons) and got a JS rollover script from the net.> In FF:> When the page loads, I see the text from the alt tag. The button doesn't > show up until a mouseover, and then operates as expected.> In IE:> When the page loads, the boxed red 'X' shows. The button doesn't show up > until a mouseover, and then operates as expected.> The URL is nf4l.com> TIA> Mike


Add comment
MikeR 9 April 2005 22:56:30 permanent link ]
 Murray -
What an eye! I'd looked at that til I couldn't see it. Thanks! Would you
explain "You didn't need to go outside of FP to create these rollovers,
you know?" cuz no, I didn't know.
Thanks,
Mike

Murray wrote:> This is a bad start for your page ->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/­TR/html4/loose.dtd">­>
<HEAD>>
You need an <html> tag up there, e.g.,>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/­TR/html4/loose.dtd">­> <html>> <HEAD>>
This image is not on the server ->
<IMG NAME="img1" SRC="mages/details_­off.jpg" ALT="Dx" HEIGHT="15"> WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0">>
and so it doesn't appear when the page loads. Yet, this rollover ->
<A HREF="dxdevil.htm" onMouseOver="imgOn(­'img1')" > onMouseOut="imgOff(­'img1')">>
forces the correct image to load once the new image has been rolled in. You > need to correct the typo in the image's source link from "mages/..." to > "images/...".>
You didn't need to go outside of FP to create these rollovers, you know?


Add comment
Murray 9 April 2005 23:35:05 permanent link ]
 You can just do an image swap behavior on the upstate images. Select the
image, apply the image swap behavior to swap in the rollover image
onMouseOver, and to restore it onMouseOut. Bada (as they say) bing, bada
boom.

--
Murray
============

"MikeR" <nf4l@pobox.com> wrote in message
news:e%23bniXTPFHA.­1884@TK2MSFTNGP15.ph­x.gbl...> Murray -> What an eye! I'd looked at that til I couldn't see it. Thanks! Would you > explain "You didn't need to go outside of FP to create these rollovers, > you know?" cuz no, I didn't know.> Thanks,> Mike>
Murray wrote:>> This is a bad start for your page ->>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >> "http://www.w3.org/­TR/html4/loose.dtd">­>>
<HEAD>>>
You need an <html> tag up there, e.g.,>>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >> "http://www.w3.org/­TR/html4/loose.dtd">­>> <html>>> <HEAD>>>
This image is not on the server ->>
<IMG NAME="img1" SRC="mages/details_­off.jpg" ALT="Dx" HEIGHT="15">> WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0">>>
and so it doesn't appear when the page loads. Yet, this rollover ->>
<A HREF="dxdevil.htm" onMouseOver="imgOn(­'img1')" >> onMouseOut="imgOff(­'img1')">>>
forces the correct image to load once the new image has been rolled in. >> You need to correct the typo in the image's source link from "mages/..." >> to "images/...".>>
You didn't need to go outside of FP to create these rollovers, you know?>


Add comment
MikeR 10 April 2005 00:35:29 permanent link ]
 Murray -
I KNOW this is in English, but I'm suffering from an acute case of
thick-as-a-brick. I went badda flop. More detail please?
Thanks,
Mike

Murray wrote:> You can just do an image swap behavior on the upstate images. Select the > image, apply the image swap behavior to swap in the rollover image > onMouseOver, and to restore it onMouseOut. Bada (as they say) bing, bada > boom.>
Add comment
Murray 10 April 2005 00:44:55 permanent link ]
 8)

You need a pizza.

Select the upstate image on the Design view of FP2003. Use FORMAT |
Behaviors > Insert > Swap Image, and browse to and select the image to roll
in onMouseOver.

Do this for each desired rollover.

Bada bing?

--
Murray
============

"MikeR" <nf4l@pobox.com> wrote in message
news:OQVJ3OUPFHA.15­28@TK2MSFTNGP09.phx.­gbl...> Murray -> I KNOW this is in English, but I'm suffering from an acute case of > thick-as-a-brick. I went badda flop. More detail please?> Thanks,> Mike>
Murray wrote:>> You can just do an image swap behavior on the upstate images. Select the >> image, apply the image swap behavior to swap in the rollover image >> onMouseOver, and to restore it onMouseOut. Bada (as they say) bing, bada >> boom.>>


Add comment
MikeR 10 April 2005 01:39:00 permanent link ]
 And a beer or 3. I'm using FP2002, and it's a slightly different route
to the effect, but I found it (Format|Dynamic HTML effects). Kewl! What
a wad of iccomprehensibility­ it sticks in, but the effect works in IE &
FF. I'm guessing the functions dynAnimation() {}
and clickSwapImg() {} are part of the FP extensions?

I also found a way to do it inline in the OnMousex call. I used the
DHTML on the Password Bank link, if you wanna see the differences.

Bada BING!
Thanks again,
Mike
8)>
You need a pizza.>
Select the upstate image on the Design view of FP2003. Use FORMAT | > Behaviors > Insert > Swap Image, and browse to and select the image to roll > in onMouseOver.>
Do this for each desired rollover.>
Bada bing?>
Add comment
Murray 10 April 2005 02:22:59 permanent link ]
 That would do it.

You're welcome! I'll tell Guido to stand down.

--
Murray
============

"MikeR" <nf4l@pobox.com> wrote in message
news:OK77WyUPFHA.40­52@TK2MSFTNGP12.phx.­gbl...> And a beer or 3. I'm using FP2002, and it's a slightly different route to > the effect, but I found it (Format|Dynamic HTML effects). Kewl! What a wad > of iccomprehensibility­ it sticks in, but the effect works in IE & FF. I'm > guessing the functions dynAnimation() {}> and clickSwapImg() {} are part of the FP extensions?>
I also found a way to do it inline in the OnMousex call. I used the DHTML > on the Password Bank link, if you wanna see the differences.>
Bada BING!> Thanks again,> Mike>
8)>>
You need a pizza.>>
Select the upstate image on the Design view of FP2003. Use FORMAT | >> Behaviors > Insert > Swap Image, and browse to and select the image to >> roll in onMouseOver.>>
Do this for each desired rollover.>>
Bada bing?>>


Add comment
MikeR 10 April 2005 04:59:01 permanent link ]
 And see that he's awarded the bronze pepperoni with black olive clusters.

Murray wrote:> That would do it.>
You're welcome! I'll tell Guido to stand down.>
Add comment
Murray 10 April 2005 17:01:41 permanent link ]
 LOL - suck up.

--
Murray
============

"MikeR" <nf4l@pobox.com> wrote in message
news:OIeBIiWPFHA.11­72@TK2MSFTNGP12.phx.­gbl...> And see that he's awarded the bronze pepperoni with black olive clusters.>
Murray wrote:>> That would do it.>>
You're welcome! I'll tell Guido to stand down.>>


Add comment
Che Vilnonis 10 May 2005 19:28:57 permanent link ]
 Mark...
Isn't it \n instead of /n ???

-----Original Message-----
From: Mark A Kruger [mailto:mkruger-NhIXd0Vb7fXegbzhZkK2zA@public.gmane.org]
Sent: Tuesday, May 10, 2005 10:55 AM
To: CF-Talk
Subject: OT: Javascript question...


I want to manipulate the "innerText" property of a <div> tag. It works fine
except that I can't seem to put in a linefeed or break. I tried all the
following without success. Does anyone know how to get a linebreak in there?

-mark



-------------------­--------------------­--------------------­-----------------
-------------------­-----
divName.innerText = divName.innerText + "some new text" + "<br/>";

divName.innerText = divName.innerText + "some new text" + /n;

divName.innerText = divName.innerText + "some new text" + chr(10);

divName.innerText = divName.innerText + "some new text" + chr(13);
-------------------­--------------------­--------------------­-----------------
-------------------­----




Mark A. Kruger, CFG, MCSE
www.cfwebtools.com
www.necfug.com
http://mkruger.cfwe­btools.com






~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=49

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:206185
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Dave Watts 10 May 2005 19:55:42 permanent link ]
 
I want to manipulate the "innerText" property of a <div> > tag. It works fine except that I can't seem to put in a linefeed > or break. I tried all the following without success. Does anyone > know how to get a linebreak in there?>
-mark>
divName.innerText = divName.innerText + "some new text" + "<br/>";>
divName.innerText = divName.innerText + "some new text" + /n;>
divName.innerText = divName.innerText + "some new text" + chr(10);>
divName.innerText = divName.innerText + "some new text" + chr(13);

The escape metacharacter in JavaScript is "\". The newline character escape
sequence in JavaScript is "\n".

str = str + '\n';

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.­com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.fig­leaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:206191
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment