Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 29th, 2006, 4:55 PM   #1
hbe02
Hobbyist Programmer
 
hbe02's Avatar
 
Join Date: Mar 2006
Location: Lebanon
Posts: 148
Rep Power: 3 hbe02 is on a distinguished road
http request and html

hey guys here is html code for a page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<!-- IMP: Copyright 2001, The Horde Project. IMP is under the GPL. -->
<!-- Horde Project: http://horde.org/ | IMP: http://horde.org/imp/ -->
<!--    GNU Public License: http://www.fsf.org/copyleft/gpl.html   -->
<html lang="en-US"><head>
<title>Imail :: Welcome to Imail</title>
<link rel="SHORTCUT ICON" href="/imp/graphics/favicon.ico" type="image/x-icon" />
<link href="/css.php?app=imp" rel="stylesheet" type="text/css" />
</head>

<body onload="setFocus()">
<script language="JavaScript" type="text/javascript">
<!--

function setFocus()
{
    document.implogin.imapuser.focus();
}

function submit_login()
{
    if (document.implogin.imapuser.value == "") {
        alert('Please provide your username and password');
        document.implogin.imapuser.focus();
        return false;
    } else if (document.implogin.pass.value == "") {
        alert('Please provide your username and password');
        document.implogin.pass.focus();
        return false;
    } else {
        return true;
    }
}
//-->
</script>

<script language="JavaScript1.2" type="text/javascript">
<!--
function enter_key_trap(e)
{
    var keyPressed;

    if (document.layers) {
        keyPressed = String.fromCharCode(e.which);
    } else if (document.all) {
        keyPressed = String.fromCharCode(window.event.keyCode);
    } else if (document.getElementById) {
        keyPressed = String.fromCharCode(e.keyCode);
    }

    if ((keyPressed == "\r" || keyPressed == "\n") && (submit_login())) {
        document.implogin.submit();
    }
}
//-->
</script>

<form action="/imp/redirect.php?Horde=7ee9cf3d5dba3f4a4bda1103fce00a8f" method="post" name="implogin">
<input type="hidden" name="actionID" value="105" />
<input type="hidden" name="url" value="" />
<input type="hidden" name="mailbox" value="INBOX" />

<table align="center" border="0" width="300">
<tr><td align="center" colspan="2" class="header">
  Welcome to Imail</td></tr>
        <tr>
    <td align="right" class="light"><b>Username</b></td>
    <td align="left"><input type="text" tabindex="1" name="imapuser" value="" /></td>
    </tr>
<tr>
    <td align="right" class="light"><b>Password</b></td>
    <td align="left"><input type="password" tabindex="2" name="pass" /></td>
</tr>

<tr>
    <td>
        <input type="hidden" name="server" value="pop.aub.edu.lb" />
        <input type="hidden" name="port" value="143" />
        <input type="hidden" name="namespace" value="" />
        <input type="hidden" name="maildomain" value="aub.edu.lb" />
        <input type="hidden" name="protocol" value="imap/notls" />
        <input type="hidden" name="realm" value="" />
    </td>

    <td><input type="hidden" name="folders" value="INBOX." /></td>
</tr>

<tr>
    <td align="right" class="light"><b>Language</b></td>
    <td align="left" class="light"><select name="new_lang" onchange="selectLang()"><option value="ar_OM">Arabic (Oman) (&#x0627;&#x0644;&#x0639;&#x0631;&#x0628;&#x064a;&#x0629;)</option><option value="ar_SY">Arabic (Syria) (&#x0627;&#x0644;&#x0639;&#x0631;&#x0628;&#x064a;&#x0629;)</option><option value="id_ID">Bahasa Indonesia</option><option value="bg_BG">Bulgarian (&#x0411;&#x044a;&#x043b;&#x0433;&#x0430;&#x0440;&#x0441;&#x043a;&#x0438;)</option><option value="ca_ES">Catal&agrave;</option><option value="zh_CN">Chinese (Simplified) (&#x7b80;&#x4f53;&#x4e2d;&#x6587;)</option><option value="zh_TW">Chinese (Traditional) (&#x6b63;&#x9ad4;&#x4e2d;&#x6587;)</option><option value="cs_CZ">Czech (&#x010c;esky)</option><option value="da_DK">Dansk</option><option value="de_DE">Deutsch</option><op

ffb

tion value="en_GB">English (GB)</option><option value="en_US" selected="selected">English (US)</option><option value="es_ES">Espa&ntilde;ol</option><option value="et_EE">Eesti</option><option value="fr_FR">Fran&ccedil;ais</option><option value="gl_ES">Galego</option><option value="el_GR">Greek (&#x0395;&#x03bb;&#x03bb;&#x03b7;&#x03bd;&#x03b9;&#x03ba;&#x03ac;)</option><option value="is_IS">&Iacute;slenska</option><option value="it_IT">Italiano</option><option value="ja_JP">Japanese (&#x65e5;&#x672c;&#x8a9e;)</option><option value="ko_KR">Korean (&#xd55c;&#xad6d;&#xc5b4;)</option><option value="lv_LV">Latvie&#x0161;u</option><option value="lt_LT">Lietuvi&#x0173;</option><option value="mk_MK">Macedonian (&#x041c;&#x0430;&#x043a;&#x0435;&#x0434;&#x043e;&#x043d;&#x0441;&#x043a;&#x0438;)</option><option value="hu_HU">Magyar</option><option value="nl_NL">Nederlands</option><option value="nb_NO">Norsk bokm&aring;l</option><option value="nn_NO">Norsk nynorsk</option><option value="pl_PL">Polski</option><option value="pt_PT">Portugu&ecirc;s</option><option value="pt_BR">Portugu&ecirc;s Brasileiro</option><option value="ro_RO">Rom&acirc;n&auml; (Romanian)</option><option value="ru_RU">Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;) (Windows)</option><option value="ru_RU.KOI8-R">Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;) (KOI8-R)</option><option value="sk_SK">Slovak (Sloven&#x010d;ina)</option><option value="sl_SI">Slovenian (Sloven&#x0161;&#x010d;ina)</option><option value="fi_FI">Suomi</option><option value="sv_SE">Svenska</option><option value="th_TH">Thai (&#x0e44;&#x0e17;&#x0e22;)</option><option value="uk_UA">Ukrainian (&#x0423;&#x043a;&#x0440;&#x0430;&#x0457;&#x043d;&#x0441;&#x044c;&#x043a;&#x0430;)</option></select></td>
</tr>

<tr>
    <td>&nbsp;</td>
    <td align="left" class="light"><input type="submit" class="button" name="button" tabindex="4" value="Log in" onclick="return submit_login();" /></td>
</tr>

</table>
</form>

<script language="JavaScript" type="text/javascript">
<!--

function updatePort()
{
}

function selectLang()
{
    // We need to reload the login page here, but only if the user hasn't
    // already entered a username and password.
    if (document.implogin.imapuser.value == '' &&
        document.implogin.pass.value == '') {
        var lang_page = 'login.php?new_lang=' + document.implogin.new_lang[document.implogin.new_lang.selectedIndex].value;
        self.location = lang_page;
    }
}

//-->
</script>

<script language="JavaScript1.2" type="text/javascript">
<!--
// Setup the enter keytrap code
if (window.document.captureEvents != null) {
    window.document.captureEvents(Event.KEYPRESS);
    window.document.onkeypress = enter_key_trap;
}
//-->
</script>
<!-- This file contains any "Message Of The Day" Type information -->
<!-- It will be included below the log-in form on the login page. -->

<script language="JavaScript" type="text/javascript">
<!--
if (parent.frames.horde_main) parent.document.title = 'Imail :: Welcome to Imail';
//-->
</script>
<BR>
<table>
</tr></table>

</body>
</html>
how does i need to be able to use my web client to login with a username and password..
in other words i want to be able to perform this line in an http request:
document.implogin.submit();
i think i need to use the http post command, but in what syntax.. i dont really know html/scripting.. and dont plan on learning for this short term project since im just doing this for fun..
so should i look into http post requests more?
how can i know the systax of my http request by looking at the source code of the webpage, specifically the "submit" button..
thanks a bunch all..
hbe02 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
send() problem w/ http server kch_86 C 2 Nov 25th, 2005 12:53 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC