"Pre-enter" username/password
From advanced to novice... come, join in, teach, and learn. Web programming and help. We have stuff on it all: php, html, asp, asp.net, etc. Share your coding expertise too.

Moderators: Forum Experts, Management

"Pre-enter" username/password

Postby Thomas52 on Tue Aug 31, 2010 11:06 pm

I have a page at http://www.barn.adkins9.net for my "barn cam." (If prompted, "guest" & "guest.) It is set to refresh every five seconds. On one monitor (CRT) the page refreshes with a horizontal line "scanning" from the top to the bottom of the page. On another monitor (LCD) the screen "blanks" then reappears after a second or two, giving it a "flicker" appearance. Is there a way to control this effect? - I'd prefer the "scan" to the "flicker," if I can control it.
The second question is: how can I "pre-program" the web page for the guest username & password to be entered & accepted automatically without everyone having to enter it?
:::::::::::::::::::::::::::
User avatar
Thomas52
PROfessional Member
 
Posts: 135
Joined: Sat Dec 14, 2002 5:03 am
Location: The foothills of the beautiful Blue Ridge Mountains of Western North Carolina

Re: "Pre-enter" username/password

Postby Thomas52 on Sat Sep 04, 2010 11:59 pm

Okay, everything works fine now, except some minor problems with the Chrome browser. Still trying to figure out how to "bypass" the username/password request. My IP camera needs the username/password on my LAN, but I have "re-directed" the image to send to the "new" web page. How can I "pre-program" the 'guest' name/pw on the page, or "pre-enter" them in the html?
:::::::::::::::::::::::::::
User avatar
Thomas52
PROfessional Member
 
Posts: 135
Joined: Sat Dec 14, 2002 5:03 am
Location: The foothills of the beautiful Blue Ridge Mountains of Western North Carolina

Re: "Pre-enter" username/password

Postby Thomas52 on Sat Jan 15, 2011 6:08 pm

I have reorganized everything and have the cams accessible at http://adkins9.net/camera/
I have yet figured out how to make a cookie or in some other fashion "pre-enter" the "guest" username and password.
Any helps or ideas appreciated.
:::::::::::::::::::::::::::
User avatar
Thomas52
PROfessional Member
 
Posts: 135
Joined: Sat Dec 14, 2002 5:03 am
Location: The foothills of the beautiful Blue Ridge Mountains of Western North Carolina

Re: "Pre-enter" username/password

Postby gries818 on Sat Jan 15, 2011 6:27 pm

Thomas52 wrote:I have reorganized everything and have the cams accessible at http://adkins9.net/camera/
I have yet figured out how to make a cookie or in some other fashion "pre-enter" the "guest" username and password.
Any helps or ideas appreciated.


Usually this functionality is something that is built into the browser, not done in the page. If you want the username and password to be automatically entered, you should consider removing the username and password since it isn't being used.

I also checked out your page source... you should consider learning CSS instead of using outdated and unsupported tags like the <font> tag the bgcolor attributes for body. Try something like this (for background-color):

index.html:
Code: Select all
<html>
<head>
<title>Web Cam Options</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
 
<body>
</body>
 
</html>


style.css
Code: Select all
body {
background-color:#073A6D;
color:#FFFFFF;
margin-left:10%;
margin-right:30%;
font-family:"Tahoma";
}

a {
color:#0000FF;
}


Using CSS is the modern way to style webpages. Here is a link to a tutorial: http://www.w3schools.com/css/default.asp
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
User avatar
gries818
Software Development
 
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Re: "Pre-enter" username/password

Postby kanaloa on Sat Jan 15, 2011 6:27 pm

Thomas52 wrote:I have reorganized everything and have the cams accessible at http://adkins9.net/camera/
I have yet figured out how to make a cookie or in some other fashion "pre-enter" the "guest" username and password.
Any helps or ideas appreciated.


If I understand correctly, just use the value="{username}" and value="{password}" in your input fields. EDIT: Now that I looked at the page, I see you're using .htaccess popup to get the user/pass. So my suggestion below would only work if you did it through a form tag.

Like so:

Code: Select all
<input type="text" name="username" value="guest_username_value" />
<input type="password" name="password" value="guest_password_value" />


That'll automatically put the values into the proper fields... the user will just need to hit submit. :yesnod:
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
User avatar
kanaloa
President
 
Posts: 11707
Joined: Sun Mar 10, 2002 1:18 am
Location: Columbia, SC
Real Name: John Derrick

Re: "Pre-enter" username/password

Postby gries818 on Sat Jan 15, 2011 6:30 pm

kanaloa wrote:
Thomas52 wrote:I have reorganized everything and have the cams accessible at http://adkins9.net/camera/
I have yet figured out how to make a cookie or in some other fashion "pre-enter" the "guest" username and password.
Any helps or ideas appreciated.


If I understand correctly, just use the value="{username}" and value="{password}" in your input fields.

Like so:

Code: Select all
<input type="text" name="username" value="guest_username_value" />
<input type="password" name="password" value="guest_password_value" />


That'll automatically put the values into the proper fields... the user will just need to hit submit. :yesnod:


I'm very confused... the username and password aren't input fields already... my browser drops down a standard login box from the page.
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
User avatar
gries818
Software Development
 
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Re: "Pre-enter" username/password

Postby kanaloa on Sat Jan 15, 2011 6:31 pm

gries818 wrote:Usually this functionality is something that is built into the browser, not done in the page. If you want the username and password to be automatically entered, you should consider removing the username and password since it isn't being used.


Or he could use a form tag to accept the user/pass, instead of protecting it like now. Then my suggestion above would work.

But Will's got a point, if anyone can see it, why password protect it at all. :yesnod:
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
User avatar
kanaloa
President
 
Posts: 11707
Joined: Sun Mar 10, 2002 1:18 am
Location: Columbia, SC
Real Name: John Derrick

Re: "Pre-enter" username/password

Postby kanaloa on Sat Jan 15, 2011 6:32 pm

gries818 wrote:
kanaloa wrote:
Thomas52 wrote:I have reorganized everything and have the cams accessible at http://adkins9.net/camera/
I have yet figured out how to make a cookie or in some other fashion "pre-enter" the "guest" username and password.
Any helps or ideas appreciated.


If I understand correctly, just use the value="{username}" and value="{password}" in your input fields.

Like so:

Code: Select all
<input type="text" name="username" value="guest_username_value" />
<input type="password" name="password" value="guest_password_value" />


That'll automatically put the values into the proper fields... the user will just need to hit submit. :yesnod:


I'm very confused... the username and password aren't input fields already... my browser drops down a standard login box from the page.


Yeah I should have looked and seen it was .htaccess protection before I commented. I was assuming he was using a "form" tag to peform the login. That was my mistake.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
User avatar
kanaloa
President
 
Posts: 11707
Joined: Sun Mar 10, 2002 1:18 am
Location: Columbia, SC
Real Name: John Derrick

Re: "Pre-enter" username/password

Postby gries818 on Sat Jan 15, 2011 6:34 pm

kanaloa wrote:
gries818 wrote:Usually this functionality is something that is built into the browser, not done in the page. If you want the username and password to be automatically entered, you should consider removing the username and password since it isn't being used.


Or he could use a form tag to accept the user/pass, instead of protecting it like now. Then my suggestion above would work.

But Will's got a point, if anyone can see it, why password protect it at all. :yesnod:


Ah ok I understand :yesnod:
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
User avatar
gries818
Software Development
 
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Re: "Pre-enter" username/password

Postby c0ldfyr3 on Sun Jan 16, 2011 8:30 am

this is actually an easy fix. just pass the username pass to the cgi script rdr.cgi.


the url would look like this:
Code: Select all
http://guest:guest@xxx.xxx.xxx.xxx/rdr.cgi


you will still get a pop up message, not asking for the login and pass, but letting the user know they will be logging in using the "Guest" account. of course this can be made automated also.
Image
User avatar
c0ldfyr3
PRO Level 15
PRO Level 15
 
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Next

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests