Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Sponsored Reviews   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2004, 02:12 AM   #1 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
frames

Okay a site i'm making www.skooma.com/sigcontest

my index uses an iframe for the content the source of the iframe is www.skooma.com/sigcontest/content.htm

What I want to do is that when Someone clicks the links to the left for the example RULES it loads in the index page www.skooma.com/sigcontest/rules2.htm How do I go about making it load a different file in that frame without having to reload the whole page?
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-01-2004, 04:09 AM   #2 (permalink)
Inactive
 
Join Date: 01-20-04
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

bazzais is liked by many
All you have to do is give the iframe a 'name' attribute and then on the hyperlinks just put the 'target' attribute the same name.

Hope this makes sense
bazzais is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 12:40 PM   #3 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
afraid I don't get what your saying.

Do you ahve an example?
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 12:54 PM   #4 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Add name="mainframe" into this:

[code:1:6d531650e0]<iframe height="98%" width="99%" align="bottom" frameborder="0" vspace="2" src="content.htm">[/code:1:6d531650e0]

So it will look like this:
[code:1:6d531650e0]
<iframe height="98%" width="99%" align="bottom" frameborder="0" vspace="2" src="content.htm" name="mainframe">[/code:1:6d531650e0]



Then make your links like this:

[code:1:6d531650e0]<a href="page.html" target="mainframe">Link Text</a>[/code:1:6d531650e0]
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 05:31 PM   #5 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
Thanks, havn't tried it yet but I think I got it now. I was trying ID="name" before thanks for clearing that up.
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 05:48 PM   #6 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
so do I make multiple iframes in the table cell that I want them to load in like this?

[code:1:e758d60eef]
<iframe height="98%" width="99%" align="bottom" frameborder="0" vspace="2" src="content.htm" name="main">



</iframe>
<iframe height="98%" width="99%" align="bottom" frameborder="0" vspace="2" src="rules.htm" name="rules">



</iframe>[/code:1:e758d60eef]

then change the target from _self to 'main' and 'rules' on the image map? like this

[code:1:e758d60eef]

<map name="navigation">
<area shape="rect" coords="42,27,126,51" href="http://www.skooma.com/sigcontest" target="home">
<area shape="rect" coords="40,50,127,69" href="http://www.skooma.com/sigcontest/rules1.htm" target="rules">
<area shape="rect" coords="38,68,127,88" href="http://www.skooma.com/sigcontest/submit.htm" target="_self"">
<area shape="rect" coords="35,86,128,106" href="http://www.skooma.com/sigcontest/entries.htm" target="_self"">
<area shape="rect" coords="43,105,127,125" href="http://www.skooma.com/sigcontest/prizes.htm" target="_self"">
<area shape="rect" coords="29,123,128,143" href="http://www.skooma.com/sigcontest/sponsors.htm" target="_self"">
<area shape="rect" coords="26,142,132,159" href="http://www.skooma.com/sigcontest/tutorials.htm" target="_self"">
<area shape="rect" coords="23,157,128,177" href="http://www.skooma.com/sigcontest/gallery.htm" target="_self"">
<area shape="rect" coords="23,177,129,199" href="http://www.skooma.com/sigcontest/contact.htm" target="_self"">
</map>[/code:1:e758d60eef]
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 06:23 PM   #7 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
You might want to use the php includes instead of frames.
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 06:25 PM   #8 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
guess I'd better bust out my php books. Then will I still do the name="rules" target = rules ?
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 11:27 PM   #9 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
okay, havn't gotten it yet, but I got another question.

I need a script to process this form. What I want is for it to upload a image and send it to my email account. any idea on how to do this?


[code:1:72684641a1]<form id="form" method="post" action="scripts/formmailer/formmailer.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="180000">
<p>Your Name<br /><input type="text" name="Name" /></p>

<p>Your Email<br /><input type="text" name="Email" /></p>

<p>Comments and/or Questions<br /><textarea name="Comments" rows="5" cols="40"></textarea></p>
Upload your sig here:
<input type="file" name="Sig" value="Sig" /></p>


<

<input type="submit" name="submit" value="Submit" />

<input type="reset" name="Reset" value="Clear Form" />

<input type="hidden" name="config" value="0" />
</font>
</p>

</form> [/code:1:72684641a1]
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-01-2004, 11:37 PM   #10 (permalink)
Inactive
 
Join Date: 12-11-03
Posts: 33
iTrader: 0 / 0%
Latest Blog:
None

white-raven is liked by many
I'm guessing that I insert that into my table cell, but then what else to i do to my image maps?

[code:1:490ab90bee]<?php
include ('content.htm');
include ('rules.htm');
include ('submit.htm');
include ('entries.htm');
include ('prizes.htm');
include ('sponsors.htm');
include ('tutorials.htm');
include ('gallery.htm');
include ('contact.htm');
?>[/code:1:490ab90bee]

as for that form I tried to use formmailer that i found at hotscripts but I't won't upload the file. Heres the code for that and this form is processed by formmailer.

http://www.sigcontest.com/submit.htm

[code:1:490ab90bee]<?php
////////////////////////////////////////////////////////////////////////////
// dB Masters' PHP FormMailer 3.5.1, Copyright (c) 2004 dB Masters Multimedia
// FormMailer comes with ABSOLUTELY NO WARRANTY
// Licensed under the AGPL
// See license.txt and readme.txt for details
////////////////////////////////////////////////////////////////////////////
// General Variables
$check_referrer="yes";
$referring_domains="http://sigcontest.com/,http://www.skooma.com/";

// Default Error and Success Page Variables
$error_page_title="Error - Missed Fields";
$error_page_text="Please use your browser's back button to return to the form and complete the required fields.";
$thanks_page_title="Signiture has been submitted";
$thanks_page_text="Thank you for your entrie";

// options to use if hidden field "config" has a value of 0
$tomail[0]="aqrhine@gmail.com,aqrhine@hotmail.com" ;
$cc_tomail[0]="";
$bcc_tomail[0]="";
$subject[0]="Sigcontest.com Entrie";
$reply_to_field[0]="Email";
$required_fields[0]="Name,Email,Agree";
$required_email_fields[0]="Email";
$attachment_fields[0]="";
$error_page[0]="";
$thanks_page[0]="http://www.sigcontest.com";
$send_copy[0]="no";
$send_copy_fields[0]="Name,Comments";
$copy_subject[0]="Your entrie has been submitted";
$copy_from[0]="Aqrhine@gmail.com";
$copy_tomail_field[0]="Email";
$mail_type[0]="vert_table";
$mail_priority[0]="1";
$return_ip[0]="yes";
$header[0]="";
$footer[0]="";

// options to use if hidden field "config" has a value of 1
$tomail[1]="";
$cc_tomail[1]="";
$bcc_tomail[1]="";
$subject[1]="";
$reply_to_field[1]="";
$required_fields[1]="";
$required_email_fields[1]="";
$attachment_fields[1]="";
$error_page[1]="";
$thanks_page[1]="";
$send_copy[1]="";
$send_copy_fields[1]="";
$copy_subject[1]="";
$copy_from[1]="";
$copy_tomail_field[1]="";
$mail_type[1]="";
$mail_priority[1]="";
$return_ip[1]="";
$header[1]="";
$footer[1]="";

// options to use if hidden field "config" has a value of 2
$tomail[2]="";
$cc_tomail[2]="";
$bcc_tomail[2]="";
$subject[2]="";
$reply_to_field[2]="";
$required_fields[2]="";
$required_email_fields[2]="";
$attachment_fields[2]="";
$error_page[2]="";
$thanks_page[2]="";
$send_copy[2]="";
$send_copy_fields[2]="";
$copy_subject[2]="";
$copy_from[2]="";
$copy_tomail_field[2]="";
$mail_type[2]="";
$mail_priority[2]="";
$return_ip[2]="";
$header[2]="";
$footer[2]="";

/////////////////////////////////////////////////////////////////////////
// Don't muck around past this line unless you know what you are doing //
/////////////////////////////////////////////////////////////////////////
ob_start();
$config=$_POST["config"];
$tomail=$tomail[$config];
$cc_tomail=$cc_tomail[$config];
$bcc_tomail=$bcc_tomail[$config];
$copy_from=$copy_from[$config];
$subject=$subject[$config];
$reply_to_field=$reply_to_field[$config];
$required_fields=$required_fields[$config];
$required_email_fields=$required_email_fields[$con fig];
$attachment_fields=$attachment_fields[$config];
$error_page=$error_page[$config];
$thanks_page=$thanks_page[$config];
$send_copy=$send_copy[$config];
$send_copy_fields=$send_copy_fields[$config];
$copy_subject=$copy_subject[$config];
$copy_tomail_field=$copy_tomail_field[$config];
$mail_type=$mail_type[$config];
$mail_priority=$mail_priority[$config];
$return_ip=$return_ip[$config];
$header=$header[$config];
$footer=$footer[$config];
if($header!="")
{
include($header);
}
if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
{
Function hiddenFields($fieldName)
{
$hidden[]="submit";
$hidden[]="submit_x";
$hidden[]="submit_y";
$hidden[]="Submit";
$hidden[]="Submit_x";
$hidden[]="Submit_y";
$hidden[]="config";
$hidden_run=sizeof($hidden);
$show_field="yes";
for($i=0;$i<$hidden_run;$i++)
{
if($fieldName==$hidden[$i])
{
$show_field="no";
}
}
return $show_field;
}
Function parseArray($key)
{
$array_value=$_POST[$key];
$count=1;
extract($array_value);
foreach($array_value as $part_value)
{
if($count > 1){$value.=", ";}
$value.=$part_value;
$count=$count+1;
}
return $value;
}
Function htmlHeader()
{
$htmlHeader="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n<html>\n<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>\n<body>\n<table cellpadding="2" cellspacing="0" border="0" width="600">\n";
return $htmlHeader;
}
Function htmlFooter()
{
$htmlFooter="</table>\n</body>\n</html>\n";
return $htmlFooter;
}
if($check_referrer=="yes")
{
$ref_check=preg_split('/,/',$referring_domains);
$ref_run=sizeof($ref_check);
$referer=$_SERVER['HTTP_REFERER'];
$domain_chk="no";
for($i=0;$i<$ref_run;$i++)
{
$cur_domain=$ref_check[$i];
if(stristr($referer,$cur_domain)){$domain_chk="yes ";}
}
}
else
{
$domain_chk="yes";
}
if($domain_chk=="yes")
{
$mail="yes";
if($required_fields != "")
{
$req_check=preg_split('/,/',$required_fields);
$req_run=sizeof($req_check);
$error_message="";
for($i=0;$i<$req_run;$i++)
{
$cur_field_name=$req_check[$i];
$cur_field=$_POST[$cur_field_name];
if($cur_field=="")
{
$error_message=$error_message."You are missing the ".$req_check[$i]." field<br />";
$mail="no";
}
}
}
if($required_email_fields != "")
{
$email_check=preg_split('/,/',$required_email_fields);
$email_run=sizeof($email_check);
for($i=0;$i<$email_run;$i++)
{
$cur_email_name=$email_check[$i];
$cur_email=$_POST[$cur_email_name];
if($cur_email=="" || !eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$cur_email))
{
$error_message=$error_message."You are missing the ".$email_check[$i]." field or the email is not a valid email address.<br />";
$mail="no";
}
}
}
if($mail=="yes")
{
if(getenv(HTTP_X_FORWARDED_FOR))
{$user_ip=getenv("HTTP_X_FORWARDED_FOR");}
else
{$user_ip=getenv("REMOTE_ADDR");}
if($mail_type=="vert_table")
{
$message=htmlHeader();
foreach($_POST as $key=>$value)
{
if(is_array($value))
{
$value=parseArray($key);
}
$value=stripslashes($value);
$value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
$value=nl2br($value);
if(hiddenFields($key)=="yes")
{
$message.="<tr>\n<td align="left" valign="top" style="white-space:nowrap;"><b>".$key."</b></td>\n<td align="left" valign="top" width="100%">".$value."</td></tr>";
}
}
if($return_ip=="yes")
{
$message.="<tr>\n<td align="left" valign="top" style="white-space:nowrap;"><b>Sender IP</b></td>\n<td align="left" valign="top" width="100%">".$user_ip."</td></tr>";
}
$message.=htmlFooter();
}
else if($mail_type=="horz_table")
{
$message=htmlHeader();
$message.="<tr>\n";
foreach($_POST as $key=>$value)
{
if(hiddenFields($key)=="yes")
{
$message.="\n<td align="left" valign="top" style="white-space:nowrap;"><b>".$key."</b></td>";
}
}
if($return_ip=="yes")
{
$message.="<td align="left" valign="top" style="white-space:nowrap;"><b>Sender IP</b></td>";
}
$message=$message."</tr>\n<tr>\n";
foreach($_POST as $key=>$value)
{
if(is_array($value))
{
$value=parseArray($key);
}
$value=stripslashes($value);
$value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
$value=nl2br($value);
if(hiddenFields($key)=="yes")
{
$message.="\n<td align="left" valign="top" style="white-space:nowrap;">".$value."</td>";
}
}
if($return_ip=="yes")
{
$message.="<td align="left" valign="top" style="white-space:nowrap;">".$user_ip."</td>";
}
$message.="</tr>\n";
$message.=htmlFooter();
}
else
{
$message="";
foreach($_POST as $key=>$value)
{
if(is_array($value))
{
$value=parseArray($key);
}
$value=stripslashes($value);
if(hiddenFields($key)=="yes")
{
$message.=$key.": ".$value."\n\n";
}
}
if($return_ip=="yes")
{
$message.="Sender IP: ".$user_ip;
}
}
$extra="From: ".$_POST[$reply_to_field]."\n";
$extra.="X-Priority: $mail_priority\n";
if($cc_tomail!="")
{
$extra.="Cc: $cc_tomail\n";
}
if($bcc_tomail!="")
{
$extra.="Bcc: $bcc_tomail\n";
}
if($mail_type=="horz_table" || $mail_type=="vert_table")
{
$content_type="MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n";
}
else
{
$content_type="Content-type: text/plain; charset=iso-8859-1\n";
}
if($attachment_fields!="")
{
$semi_rand = md5(time());
$border="==Multipart_Boundary_x{$semi_rand}x";
$extra.="Content-Type: multipart/mixed; boundary="{$border}"\n";
$message="This is a multi-part message in MIME format with file attachments.\n\n" .
"--{$border}\n".$content_type."\n" .
"Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";
$att_check=preg_split('/,/',$attachment_fields);
$size_check=preg_split('/,/',$attachment_size);
$att_run=sizeof($att_check);
for($i=0;$i<$att_run;$i++)
{
$fileatt=$_FILES[$att_check[$i]]['tmp_name'];
$fileatt_name=$_FILES[$att_check[$i]]['name'];
$fileatt_type=$_FILES[$att_check[$i]]['type'];
if (is_uploaded_file($fileatt))
{
$file=fopen($fileatt,'rb');
$data=fread($file,filesize($fileatt));
fclose($file);
$data=chunk_split(base64_encode($data));
$message.="--{$border}\n";
$message.="Content-Type: "".$fileatt_type.""; name="".$fileatt_name.""\n";
$message.="Content-Disposition: attachment; filename="".$fileatt_name.""\n";
$message.="Content-Transfer-Encoding: base64\n\n".$data."\n\n";
}
}
$message.="--{$border}--\n";
}
else
{
$extra.=$content_type;
}
mail("$tomail", "$subject", "$message", "$extra");
if($send_copy=="yes")
{
$copy_message="";
$copy_fields_check=preg_split('/,/',$send_copy_fields);
$copy_run=sizeof($copy_fields_check);
for($i=0;$i<$copy_run;$i++)
{
$cur_key=$copy_fields_check[$i];
$cur_value=$_POST[$cur_key];
$copy_message.="\n".$cur_key.": ".$cur_value."\n\n";
}
$copy_email=$_POST[$copy_tomail_field];
mail("$copy_email", "$copy_subject", "$copy_message", "From: ".$copy_from."");
}
if($thanks_page=="")
{
echo "<p>$thanks_page_title</p>";
echo "<p>$thanks_page_text</p>";
}
else
{
ob_end_clean();
$redirect="Location: ".$thanks_page;
header($redirect);
}
}
else
{
if($error_page=="")
{
echo "<p>$error_page_title</p>";
echo $error_message;
echo "<p>$error_page_text</p>";
}
else
{
ob_end_clean();
$redirect="Location: ".$error_page;
header($redirect);
}
}
}
else
{
echo "<p>Sorry, mailing request came from an unauthorized domain.</p>";
}
}
else
{
echo "<p>Error</p>";
echo "<p>No form data has been sent to the script</p>";
}
if($footer!="")
{
include($footer);
}
ob_end_flush();
?>[/code:1:490ab90bee]
white-raven is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
frames Casanova Web Design Lobby 1 01-28-2008 05:27 PM
help please .. frames gump2773 Web Design Lobby 2 08-30-2006 05:53 AM
Frames - please help! Jason Web Design Lobby 3 06-14-2004 07:27 AM
Use of frames gafort Web Design Lobby 2 03-31-2004 11:11 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:20 AM.
© Copyright 2008 V7 Inc