473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Autofilling in firefox

25
Hi all,

How to do autofilling of a web form in firefox using javascript. ie through java script program should do autofilling of the web form.


Thanks
DNK2007
Jan 16 '08 #1
18 2144
gits
5,390 Expert Mod 4TB
hi ...

what have you done so far? where/how do you get the values to fill in the form?

kind regards
Jan 16 '08 #2
DNK2007
25
Hi

I need to fill the form details(username, password) from the java script.
Assume javascript uses static username, password.


thanks
DNK2007
Jan 16 '08 #3
gits
5,390 Expert Mod 4TB
ok ... so you have a username and password stored in javascript variables? to set the value of an input-box that has an id you could use the following:

Expand|Select|Wrap|Line Numbers
  1. // we retrieve a reference to the input-element
  2. var input_box = document.getElementById('your_input_box_id');
  3.  
  4. // we set the value of the box
  5. input_box.value = 'whatever_value_you_have';
kind regards
Jan 16 '08 #4
DNK2007
25
ok ... so you have a username and password stored in javascript variables? to set the value of an input-box that has an id you could use the following:

Expand|Select|Wrap|Line Numbers
  1. // we retrieve a reference to the input-element
  2. var input_box = document.getElementById('your_input_box_id');
  3.  
  4. // we set the value of the box
  5. input_box.value = 'whatever_value_you_have';
kind regards

Hi,

Its right if web page exists in the local box, but what about when a web page
is laoded by firefox which exists on remote server say gmail login page. How my program fill the login items?


thanks
DNK2007
Jan 16 '08 #5
gits
5,390 Expert Mod 4TB
then we have a simple answer: you cannot cross-site-script for security-reasons ... you only may script for your own pages ...

kind regards
Jan 16 '08 #6
DNK2007
25
then we have a simple answer: you cannot cross-site-script for security-reasons ... you only may script for your own pages ...

kind regards
Hi

But what about firefox builtin password manager which fills the username, password automatically. It fills the fields when web page is loaded and also so many commercial software exists in the market that provide this feature. I want my program to do this operation. Is there any other language from which we can achive this?


Thanks
DNK2007
Jan 17 '08 #7
gits
5,390 Expert Mod 4TB
you may play araound with the FF/Mozilla LoginManager but since i don't know about that yet you should investigate that from there. another way would be a serverside proxy ... so you could make the requests from your server, copy the page and send it to the user so that it comes from your own domain ... that could be done with the serverside language you prefer ...

kind regards
Jan 17 '08 #8
DNK2007
25
you may play araound with the FF/Mozilla LoginManager but since i don't know about that yet you should investigate that from there. another way would be a serverside proxy ... so you could make the requests from your server, copy the page and send it to the user so that it comes from your own domain ... that could be done with the serverside language you prefer ...

kind regards
Hi,

U said about another way ie server side proxy. Hw it is done? can u explain me in detail? Another question - how about editing the source code of the loaded page and reloading it? Any solutions for this question?

Thanks
DNK2007
Jan 17 '08 #9
gits
5,390 Expert Mod 4TB
... you only can do that serverside ... that server has to request the page. then you may write (copy) that page through parsing the source-code of it ... may be here you could change the page ... now deliver YOUR recently written page (that is an adapted copy of the requested page) where you could do whatever you want ... :)

what do you mean with edit the source-code ... let the user edit it? the currently loaded page?
Jan 17 '08 #10
DNK2007
25
... you only can do that serverside ... that server has to request the page. then you may write (copy) that page through parsing the source-code of it ... may be here you could change the page ... now deliver YOUR recently written page (that is an adapted copy of the requested page) where you could do whatever you want ... :)

what do you mean with edit the source-code ... let the user edit it? the currently loaded page?
Hi,

We can get the source code of the loaded page right? By parsing the file for username, password field we can set the values.


Thanks
DNK2007
Jan 17 '08 #11
gits
5,390 Expert Mod 4TB
could you give an example for that :) ... how would you retrieve the source of a loaded page from another domain ... i think you cannot do that with javascript
Jan 17 '08 #12
DNK2007
25
could you give an example for that :) ... how would you retrieve the source of a loaded page from another domain ... i think you cannot do that with javascript
Hi

I thought it is possible to get the source of the webpage from javascript. I am new to java script. If we get source in some other way is it possible to do the autofilling by editing the source and reloading the webpage?


Thanks
DNK2007
Jan 17 '08 #13
gits
5,390 Expert Mod 4TB
as i said ... not with javascript ... you may do a serverside trick ... let your server request the page and handle it as i mentioned above ...

kind regards
Jan 17 '08 #14
DNK2007
25
as i said ... not with javascript ... you may do a serverside trick ... let your server request the page and handle it as i mentioned above ...

kind regards

Hi gits,

Thanks for ur valuable solutions. Any way I will be back if I found difficult in this.

Thanks
DNK2007
Jan 21 '08 #15
DNK2007
25
Hi gits,

Is it possible for us to do autofilling from client machine not from server or some other intermediate machine?


Thanks
DNK2007
Jan 23 '08 #16
gits
5,390 Expert Mod 4TB
hi ...

i only could repeat what was said already: everything you do with javascript is relativly strictly bound to your own pages ... and i case you find a way for one browser (may be you could use Mozilla's LoginManager, or write your own extension, or something like that) ... you have probably to find another way for other browsers ...

kind regards
Jan 23 '08 #17
DNK2007
25
hi ...

i only could repeat what was said already: everything you do with javascript is relativly strictly bound to your own pages ... and i case you find a way for one browser (may be you could use Mozilla's LoginManager, or write your own extension, or something like that) ... you have probably to find another way for other browsers ...

kind regards
Hi gits,

Sorry for asking the same question again and again. How about perl or php? will they support for client side scripting of the loaded webpage?

Thanks
DNK2007
Jan 23 '08 #18
gits
5,390 Expert Mod 4TB
?? php, perl, asp, jsp, asp.net etc. are serverside-scripting languages ... you cannot use it at the clientside in an webapplication ...
Jan 23 '08 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
5
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>>...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
12
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works...
6
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value...
0
by: DNK2007 | last post by:
Hi all, I want to know how firefox autofills the web form of a loaded webpage? Thanks DNK2007
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
by: DNK2007 | last post by:
Hi all, Is it possible to write a perl program that do autofilling of the login webform(username, password) of other domain (say hotmail.com). Assume domain name, username, password are passed as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.