/    Sign up×
Community /Pin to ProfileBookmark

Hey all,

i have a loginform on my site to a calendar-site (see code)
I just copied the logincode from their site and edited to mine..
to login I need to enter my login name (for example 123456) followed by my domain (for example @mydomain.com)
(so= [email][email protected][/email])
and my password

now i would like to type my number, but not the domain. Can i edit some javascript to automatically paste ‘@mydomain’ behind the number i fill in?
Thanks in advance!!

[CODE]

<!– begin corporate time–>

<FORM NAME=”login” ACTION=”https://calimero.eur.nl/fcgi-bin/swc/lexacal.fcgi” METHOD=”POST” >
<INPUT TYPE=”hidden” NAME=”go” VALUE=”login”>
<INPUT type=”hidden” name=”cgi_path” value=”https://calimero.eur.n/fcgi-bin/swc/”>
<input type=”hidden” name=”from_lf” value=”on”>

<CENTER>
&nbsp;
<P>
<TABLE ALIGN=”center”>
<TR>
<TD ALIGN=”center” VALIGN=”center”>
<TABLE>
</TR>

<TR>
<TD ALIGN=”left” NOWRAP >
<INPUT TYPE=”hidden” NAME=”server” VALUE=”localhost,101″>
<INPUT TYPE=”hidden” NAME=”language” VALUE=”english”>Naam:
</TD>

<TD>
<INPUT TYPE=”text” NAME=”srch_query” SIZE=”20″ MAXLENGTH=”64″ VALUE=””>
</TD>
</TR>

<b>Corporate Time:</b>
<TR ALIGN=”left”>
<TD ALIGN=”left” NOWRAP >Wachtwoord:
</TD>

<TD>
<INPUT TYPE=”password” NAME=”password” MAXLENGTH=”15″ SIZE=”20″>
</TD>
</TR>
</TABLE>
</TD>
</TR>

<TR>
<TD>
<CENTER>
<TABLE>
<TR ALIGN=”center” VALIGN=”center”>
<TD ALIGN=”center” VALIGN=”bottom”>
<INPUT type=”submit” NAME=”ok” value=”Login”>
</TD>
<TD>
&nbsp;
</TD>

<TD>
&nbsp;
</TD>

</TR>
</TABLE>
</CENTER>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</CENTER>
</form>

<!–eind corporate time–>

[/CODE]

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@baconbuttyNov 07.2005 — Rough option. Include this in the relevant text field

onblur='this.value=this.value.replace(/^s*(([a-zA-Z0-9!#$%&amp;*+/=?^_{}|~-]+(.[a-zA-Z0-9!#$%&amp;amp;*+/=?^_{}|~-]+)*)).*$/,"$[email protected]")'
Copy linkTweet thisAlerts:
@dimarsmuldersauthorNov 08.2005 — Great! thanks!

this works like a charm.. although I don't have a clue how, because (/^s*(([a-zA-Z0-9!#$%&amp;amp;*+/=?^_<span><code>{}|~-]+(.[a-zA-Z0-9!#$%&amp;amp;amp;*+/=?^_</code></span>{}|~-]+)*)).*$/,"$2 is a lot of jibberish to me.. ?

but thanks anyway!
Copy linkTweet thisAlerts:
@baconbuttyNov 09.2005 — My pleasure.

Effectively it is based on the internet standard format for addresses.

It looks for any compliant pattern of characters (called a "dot-atom") up to an @ symbol, and ignores the rest.
Copy linkTweet thisAlerts:
@dimarsmuldersauthorNov 09.2005 — ow.. so it actually means something LOL.

but is it a standard string or something? or else, how did you come up with this?

Hope one day to be able to do the same so.. trying to learn a bit. :rolleyes: ( at this moment i know HTML and a little Javascript, but it ends there..)

Thanks again
Copy linkTweet thisAlerts:
@konithomimoNov 09.2005 — If you want to understand that look into "regular expressions" or as they are often called "reg expresions"

Here is one source:

http://www.amk.ca/python/howto/regex/
Copy linkTweet thisAlerts:
@baconbuttyNov 09.2005 — dimarsmulders said:-


ow.. so it actually means something LOL.

but is it a standard string or something? or else, how did you come up with this?

Hope one day to be able to do the same so.. trying to learn a bit. ( at this moment i know HTML and a little Javascript, but it ends there..)[/QUOTE]


konithomimo said:-

If you want to understand that look into "regular expressions" or as they are often called "reg expresions"[/QUOTE]


Hi. I probably gave you an overkill solution. But if you want to understand how I came up with it the you need to:-

  • 1. Start by learning Regular Expressions in Javascript as konithomimo said.


  • Another link:-

    [URL]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsgrpregexpsyntax.asp[/URL]

  • 2. Apply that knowledge to the internet specification for e-mail addresses (not for the faint of heart!):-


  • [URL]http://www.ietf.org/rfc/rfc2822.txt[/URL]

    Regards
    Copy linkTweet thisAlerts:
    @dimarsmuldersauthorNov 11.2005 — Overkill or not, it works like a charm. I'll look into those links to study, thanks again. thanks to you too konithomimo!

    D-Mar

    (edit: I think i'm getting in over my head here.. this is tough stuff!)
    ×

    Success!

    Help @dimarsmulders spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.4,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...