Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How to move a form to the left?
Old 01-02-2008, 03:40 PM How to move a form to the left?
Extreme Talker

Posts: 216
Trades: 0
I'm using this upload script, and would like to move the browse and Upload form to the left. i have highlighted the form in the code below. Can you tell me how to move it over to the left on the web page?

Thank you.

Code:
<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
%>
<!-- #include file="aspupload.asp" -->
<!--#include file="inc_header.asp"-->
<%

' ****************************************************
  Dim uploadsDirVar
  uploadsDirVar = "C:/Documents and Settings/TA/"
' ****************************************************
function OutputForm()
%>
    <form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadTester.asp" onSubmit="return onSubmitForm();">
 <B></B><br><br>
    <input name="attach1" type="file" size=35><br>
    <br>
     <input style="margin-top:4" type=submit value="Upload">
    </form>
<%
end function
function TestEnvironment()
    Dim fso, fileName, testFile, streamTest
    TestEnvironment = ""
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FolderExists(uploadsDirVar) then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not exist.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    fileName = uploadsDirVar & "\test.txt"
    on error resume next
    Set testFile = fso.CreateTextFile(fileName, true)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have write permissions.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    Err.Clear
    testFile.Close
    fso.DeleteFile(fileName)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have delete permissions</B>, although it does have write permissions.<br>Change the permissions for IUSR_<I>computername</I> on this folder."
        exit function
    end if
    Err.Clear
    Set streamTest = Server.CreateObject("ADODB.Stream")
    If Err.Number<>0 then
        TestEnvironment = "<B>The ADODB object <I>Stream</I> is not available in your server.</B><br>Check the Requirements page for information about upgrading your ADODB libraries."
        exit function
    end if
    Set streamTest = Nothing
end function
function SaveFiles
    Dim Upload, fileName, fileSize, ks, i, fileKey
    Set Upload = New FreeASPUpload
    Upload.setMaxFileSize 0.5, "m"
    Upload.Save(uploadsDirVar)
 ' If something fails inside the script, but the exception is handled
 If Err.Number<>0 then Exit function
    SaveFiles = ""
    ks = Upload.UploadedFiles.keys
    if (UBound(ks) <> -1) then
        SaveFiles = "<B>Files uploaded:</B> "
        for each fileKey in Upload.UploadedFiles.keys
            SaveFiles = SaveFiles & Upload.UploadedFiles(fileKey).FileName & " (" & Upload.UploadedFiles(fileKey).Length & "B) "
        next
    else
        SaveFiles = "The file name specified in the upload form does not correspond to a valid file in the system."
    end if
 SaveFiles = SaveFiles & "<br>Choose another file to upload" & Upload.Form("enter_a_number") & "<br>"
 SaveFiles = SaveFiles & "Or contact support" & Upload.Form("checkbox_values") & "<br>"
end function
%>
 
<HTML>
<HEAD>
<Title>TEST</Title>
<style type="text/css">
body {margin: 1px 100px; 0px 100px;
padding: 1px;}
</style>
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  body {border-left: 1px solid #000; }>
 
<SCRIPT LANGUAGE="JavaScript">errorcolor = '#eeeeee';</Script>
<table cellspacing=0 border=0 cellpadding=40 width=100% align=left>
 <tr>
  <td align=left valign=middle>
<script language="JAVASCRIPT">
 var errfound = false;
  function ValidLength(item, len) {
     return (item.length >= len);
  }
  function error(elem, text) {
     if (errfound) return;
     window.alert(text);
     elem.select();
     elem.focus();
     elem.style.backgroundColor=errorcolor;
     errfound = true;
  }
  function Validate() {
     errfound = false;
     d=document.login
     if (!ValidLength(d.members_username.value,1))error(d.members_username,"Username should not be blank.");
     if (!ValidLength(d.members_password.value,1))error(d.members_password,"Password should not be blank.");
     return !errfound;
  }
</script>
<TR valign=top>
<div style="border:0px solid #000000; width: 705px; padding-left: 75px; text-align:top;">

<style>
BODY {background-color: white;font-family:arial; font-size:12}
</style>
<script>
function onSubmitForm() {
    var formDOMObj = document.frmSend;
    if (formDOMObj.attach1.value == "" && formDOMObj.attach2.value == "" && formDOMObj.attach3.value == "" && formDOMObj.attach4.value == "" )
        alert("Please press the browse button and pick a file.")
    else
        return true;
    return false;
}
</script>
</HEAD>
<BODY>
<br><br>
<div style="border-bottom: #A91905 2px solid;font-size:16"><br>1. Select(Click) the Browse Button<br>
2. Choose Your File For Uploading<br>
3. Select(Click) the Upload Button<br><br></div>
<%
Dim diagnostics
if Request.ServerVariables("REQUEST_METHOD") <> "POST" then
    diagnostics = TestEnvironment()
    if diagnostics<>"" then
        response.write "<div style=""margin-left:20; margin-top:30; margin-right:30; margin-bottom:30;"">"
        response.write diagnostics
        response.write "<p>After you correct this problem, reload the page."
        response.write "</div>"
    else
        response.write "<div style=""margin-left:150"">"
        OutputForm()
        response.write "</div>"
    end if
else
    response.write "<div style=""margin-left:150"">"
    OutputForm()
    response.write SaveFiles()
    response.write "<br><br></div>"
end if
%>
<br><br>
</p></div></tr></td></tr>
</table></TD></TR></TABLE>
  </TD>
 <!--#include file="inc_footer.asp"-->
  <!--<TD width="1" height=100% background="/smuse/dot.gif"><IMG src="/smuseclear.gif" width="1" height=100% border=0></TD>-->
 </TR>
</TABLE>
<!--<TABLE cellSpacing=0 valign=bottom cellPadding=0 width=100% border=0>
 <TR valign=top height=4>
  <TD colspan=2 class=gray><IMG src="/smusermanager/images/clear.gif" height=4 width=25 border=0></TD>
 </TR>
 <TR valign=middle height=25>
  <TD class=headera2>&nbsp;<FONT class=linksmall><font face="Arial" color="#ffffff" size="2">Copyright © 2007 <a href="" target="_blank"></a>. All Rights Reserved.</FONT></TD>
  <TD align=right class=headera2><font class=linksmall><font face="Arial" color="#ffffff" size="2">Email : <A href=""></A> &nbsp;&nbsp;&nbsp; </font></TD>
 </TR>
</TABLE>-->
</Body>
</BODY>
</HTML>
chrisj is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-02-2008, 07:21 PM Re: How to move a form to the left?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
CSS/HTML not ASP issue
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-02-2008, 07:24 PM Re: How to move a form to the left?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Invalid markup eg 150 what?
and reduce the value to move the form left
Quote:
else
response.write "<div style=""margin-left:150"">"
OutputForm()
response.write "</div>"
end if
else
response.write "<div style=""margin-left:150"">"
OutputForm()
response.write SaveFiles()
response.write "<br><br></div>"
end if
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-07-2008, 03:13 PM Re: How to move a form to the left?
Extreme Talker

Posts: 216
Trades: 0
Thank you
chrisj is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to move a form to the left?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13599 seconds with 12 queries