• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1585
  • Last Modified:

Firebug does not show value of hidden field?

Greetings,

Check this code out:

var socialProvider = $('#loginProvider').val();
  $('#social_icon').attr({
	src:'images/social_icons/'+socialProvider+'.png',
	alt: ''+socialProvider+''
	});
  $('#msggigyacomplete').css('margin-top','-25px');
  }

Open in new window


So I have a hidden field with the ID loginProvider that receives the name of a
social networking site using plugin.  Then, based on the name found in the value
loginProvider, it selects the appropriate image to appear in the ID social_icon.

It all works fine but I *thought* using firebug, I should see the name of the
social networking site appear in the value of loginProvider, but I did not.  To
verify it was working, I needed to alert the value of loginProvider instead.

Shouldn't firebug show the value attribute of the hidden field being populated?
0
max7
Asked:
max7
  • 6
  • 5
1 Solution
 
leakim971PluritechnicianCommented:
why the bracket line 7?
0
 
max7Author Commented:
>>>why the bracket line 7?

it's actually part of another function which I did not show since I didn't think it was necessary for the question but here is the entire block:

$('#msglogingygia1,#msglogingygia2,#loginDiv').hide();{
		 		$('#msggigyacomplete').show();
		 		$('#loginProvider').val(logingygia.loginprovider);
		 		var socialProvider = $('#loginProvider').val();
		 		//var socialIconImg ='images/social_icons/'+socialProvider+'.png';
		 		$('#social_icon').attr({
		 				src:'images/social_icons/'+socialProvider+'.png',
		 				alt: ''+socialProvider+''
		 		});
		 		$('#msggigyacomplete').css('margin-top', '-25px');
		 		}

Open in new window

0
 
leakim971PluritechnicianCommented:
Wrong javascript line 1 (the semicolon) : .hide();{

do you want :
$('#msglogingygia1,#msglogingygia2,#loginDiv').hide(function() {
		 		$('#msggigyacomplete').show();
		 		$('#loginProvider').val(logingygia.loginprovider);
		 		var socialProvider = $('#loginProvider').val();
		 		//var socialIconImg ='images/social_icons/'+socialProvider+'.png';
		 		$('#social_icon').attr({
		 				src:'images/social_icons/'+socialProvider+'.png',
		 				alt: ''+socialProvider+''
		 		});
		 		$('#msggigyacomplete').css('margin-top', '-25px');
});

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
max7Author Commented:
>>>Wrong javascript line 1 (the semicolon) : .hide();{

Thanks for pointing that out ... since the code runs ok with the semicolon, I assume jquery is slightly forgiving of some poor syntax?

So ... any ideas why firebug does not show the value attribute of the hidden field being populated?  Again, I know it the attribute is receiving the data since I can alert it.
0
 
leakim971PluritechnicianCommented:
You may havve an error (on Firefox) before reaching the alert statement
0
 
max7Author Commented:
>>>You may havve an error (on Firefox) before reaching the alert statement

hmmm, I'm not sure what that means.  what sort of error are you thinking of ?
0
 
leakim971PluritechnicianCommented:
>what sort of error are you thinking of ?

Do you see any error in the console? Do  you have public address to see your site?
0
 
max7Author Commented:
>>>Do you see any error in the console? Do  you have public address to see your site?

No errors at all and unfortunately the site is not live yet.

How about this: from what you know of firebug should it normally show the value attribute being populated or not?
0
 
leakim971PluritechnicianCommented:
with the javascript console yes of course
0
 
max7Author Commented:
Very odd ... I even corrected the error you pointed out in my code, thinking that might be preventing the value from populating but no dice. I don't know where to go from here.
0
 
max7Author Commented:
I stand corrected: I cleared my cache and checked again and sure enough, the value is populating now.  I have to assume that the syntax issue with my which you pointed out was preventing this from happening before.

Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now