Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Where Is My Javascript Code's Problem? [RSS Feed]

#1 Jan. 21, 2011 21:01:30

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


Here's my javascript function code:

function addRecipient()
{
alert("Entering addRecipient function!")
var list = document.getElementById('recipientlist');
var rlist = list.value;
var reciever = document.getElementById('recipient');
rlist = rlist + receiver.value + ", ";
reciever.value = "";
}


I get the alert box just fine, but nothing seems to happen after that.
So what's wrong with the code as is and do I need to call some other
method to refresh the browser window to show the results of my
javascript having run, in order to see my screen change?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 21, 2011 21:34:07

Sandro D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


LOL! What are you trying to do, guy?

It's obvius the alert box will appear, 'cause it's a visual element.

But the rest of the code only set a bunch of variables, it's not printing
anything, it's not launching any alert, so what are you waiting to happen?


2011/1/21 hank23 <hversem...@stchas.edu>

> Here's my javascript function code:
>
> function addRecipient()
> {
> alert("Entering addRecipient function!")
> var list = document.getElementById('recipientlist');
> var rlist = list.value;
> var reciever = document.getElementById('recipient');
> rlist = rlist + receiver.value + ", ";
> reciever.value = "";
> }
>
>
> I get the alert box just fine, but nothing seems to happen after that.
> So what's wrong with the code as is and do I need to call some other
> method to refresh the browser window to show the results of my
> javascript having run, in order to see my screen change?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 21, 2011 21:35:54

Mo J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


Lol

Sent from my iPhone

On Jan 22, 2011, at 12:34 AM, Sandro Dutra <hexo...@gmail.com> wrote:

LOL! What are you trying to do, guy?

It's obvius the alert box will appear, 'cause it's a visual element.

But the rest of the code only set a bunch of variables, it's not printing
anything, it's not launching any alert, so what are you waiting to happen?


2011/1/21 hank23 <hversem...@stchas.edu>

> Here's my javascript function code:
>
> function addRecipient()
> {
> alert("Entering addRecipient function!")
> var list = document.getElementById('recipientlist');
> var rlist = list.value;
> var reciever = document.getElementById('recipient');
> rlist = rlist + receiver.value + ", ";
> reciever.value = "";
> }
>
>
> I get the alert box just fine, but nothing seems to happen after that.
> So what's wrong with the code as is and do I need to call some other
> method to refresh the browser window to show the results of my
> javascript having run, in order to see my screen change?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 21, 2011 21:41:17

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


I was actually hoping to see the results of the code altering the
screen fields dynamically when I click the button to call the
javascript function. So if this won't do it, then how do I through the
javascript function code cause the screen fields to be refreshed when
the code changes them?

On Jan 21, 3:35 pm, "Mo J. Al-Mughrabi" <mo.mughr...@gmail.com> wrote:
> Lol
>
> Sent from my iPhone
>
> On Jan 22, 2011, at 12:34 AM, Sandro Dutra <hexo...@gmail.com> wrote:
>
> LOL! What are you trying to do, guy?
>
> It's obvius the alert box will appear, 'cause it's a visual element.
>
> But the rest of the code only set a bunch of variables, it's not printing
> anything, it's not launching any alert, so what are you waiting to happen?
>
> 2011/1/21 hank23 <hversem...@stchas.edu>
>
>
>
>
>
> > Here's my javascript function code:
>
> >  function addRecipient()
> >  {
> >          alert("Entering addRecipient function!")
> >          var list = document.getElementById('recipientlist');
> >          var rlist = list.value;
> >          var reciever = document.getElementById('recipient');
> >          rlist = rlist + receiver.value + ", ";
> >          reciever.value = "";
> >  }
>
> > I get the alert box just fine, but nothing seems to happen after that.
> > So what's wrong with the code as is and do I need to call some other
> > method to refresh the browser window to show the results of my
> > javascript having run, in order to see my screen change?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com<django-users%2Bunsubscribe@google­groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group
> athttp://groups.google.com/group/django-users?hl=en.-Hide quoted text -
>
> - Show quoted text -

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Jan. 21, 2011 23:50:16

Ivo B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


> reciever.value = “”;

should be

reciever.value = rlist;

btw: this is a django list and not JavaScript.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Jan. 22, 2011 02:23:13

Marchegay X.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


reciever => receiver ??



On Fri, Jan 21, 2011 at 10:01 PM, hank23 <hversem...@stchas.edu> wrote:

> Here's my javascript function code:
>
> function addRecipient()
> {
> alert("Entering addRecipient function!")
> var list = document.getElementById('recipientlist');
> var rlist = list.value;
> var reciever = document.getElementById('recipient');
> rlist = rlist + receiver.value + ", ";
> reciever.value = "";
> }
>
>
> I get the alert box just fine, but nothing seems to happen after that.
> So what's wrong with the code as is and do I need to call some other
> method to refresh the browser window to show the results of my
> javascript having run, in order to see my screen change?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 Jan. 24, 2011 08:16:51

Piotr Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Where Is My Javascript Code's Problem?


I think you wanted something like this to happen:http://jsfiddle.net/zalun/96vsU/zalun

On 01/21/11 21:41, hank23 wrote:
> I was actually hoping to see the results of the code altering the
> screen fields dynamically when I click the button to call the
> javascript function. So if this won't do it, then how do I through the
> javascript function code cause the screen fields to be refreshed when
> the code changes them?
>
> On Jan 21, 3:35 pm, "Mo J. Al-Mughrabi" <mo.mughr...@gmail.com> wrote:
>> Lol
>>
>> Sent from my iPhone
>>
>> On Jan 22, 2011, at 12:34 AM, Sandro Dutra <hexo...@gmail.com> wrote:
>>
>> LOL! What are you trying to do, guy?
>>
>> It's obvius the alert box will appear, 'cause it's a visual element.
>>
>> But the rest of the code only set a bunch of variables, it's not printing
>> anything, it's not launching any alert, so what are you waiting to happen?
>>
>> 2011/1/21 hank23 <hversem...@stchas.edu>
>>
>>
>>
>>
>>
>>> Here's my javascript function code:
>>
>>> function addRecipient()
>>> {
>>> alert("Entering addRecipient function!")
>>> var list = document.getElementById('recipientlist');
>>> var rlist = list.value;
>>> var reciever = document.getElementById('recipient');
>>> rlist = rlist + receiver.value + ", ";
>>> reciever.value = "";
>>> }
>>
>>> I get the alert box just fine, but nothing seems to happen after that.
>>> So what's wrong with the code as is and do I need to call some other
>>> method to refresh the browser window to show the results of my
>>> javascript having run, in order to see my screen change?
>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com<django-users%2Bunsubscribe@google­groups.com>
>>> .
>>> For more options, visit this group at
>>>http://groups.google.com/group/django-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group
>> athttp://groups.google.com/group/django-users?hl=en.-Hide quoted text -
>>
>> - Show quoted text -
>


--
bloghttp://piotr.zalewa.infojobshttp://webdev.zalewa.infotwithttp://twitter.com/zalunfacehttp://facebook.com/zaloon--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Where Is My Javascript Code's Problem? [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support