Brevity is the soul of wit...
do not know who said
(Oscar wilde)
Brevity is the soul of wit...
do not know who said
(Oscar wilde)
A caveat applies
There is not enough information to provide accurate answers, to try to elicit information
I probably wont answer the question, but the more information provided, someone will
those are the actual sizes of the images, not the desired size
<div id="main">
<h1>Pictures</h1>
<img width='594' height='292' alt='alt text is a requirement' src="Pictures/3DIM_poster.jpg" />
Poster presentation at 3DIM 2009.
<img width='594' height='612' alt='alt text is a requirement' src="Pictures/scanner_inside.jpg" />
Leica HDS3000 LiDAR scanner in the lab.
<img width='594' height='612' alt='alt text is a requirement' src="Pictures/scanner_outside.jpg" />A day of scanning in Troy.
</div>
I just pulled the sizes off the smallest image, and resized the others by proportion 730*752 > 594*612
its not a good idea to use html to resize images to suit the layout
actually resize the images with Irfanview, paintshop etc,
and serve them the correct size, (still with the sizes specified in the xhtml) smaller images = faster load times
notes
1:: the layout sucks, fixed width central column may look good on your pc,
mine is 2400px wide, what a waste of space
Ems and % are the dimensions of choice, width will adjust to screen and window size, keeping the same proportion as your design screen, on a wider range of systems
2:: incidental; the only bugs in the code is the missing alt tags in those images
WYSiWYG what you see is what you get
as in "FrontPage is a wysiwyg editor"
the code sample at the top of the prior reply should be cut and pasted into 'html view' in frontpage if you use it
the stuff in the <head></head> copied into your <head> the stuff in the <body></body> copied into your <body>
stuff between <style></style> and <script></script> tags copied between the same tags in your page head
FrontPage is not particularly friendly to import code, but the addition is MS centric so it wont **expletive deleted** up
1 file autostart on page load
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style type='text/css'>
/* css positioning for the media player */
.logo { background:transparent; color:#000000; text-align:right; font-size:85%; top:auto; left:auto; position:fixed; bottom:1px; right:1px; } //edit position by top bottom
</style>
<script type="text/javascript">
<!--//
function shrink(){
document.getElementById("MediaPlayer1").style.width=384;
document.getElementById("MediaPlayer1").style.height=300;
}
function enLarge(){
document.getElementById("MediaPlayer1").style.width=480;
document.getElementById("MediaPlayer1").style.height=402;
}
//-->
</script>
<title>video</title>
</head>
<body>
<p class='logo'>
<button onclick="enLarge()">large</button>
<button onclick="shrink()">small</button>
<A href="http://www.microsoft.com/windows/windowsmedia/player/download/"><IMG ALT="Get Windows Media Player" SRC="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" WIDTH="88" HEIGHT="31" BORDER="0"></A><br>
<OBJECT ID="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<PARAM NAME="fileName" VALUE="fullpathto/mymovie.wmv">
<PARAM NAME="showControls" VALUE="true">
<PARAM NAME="PlayCount" VALUE="0">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="fullpathto/mymovie.wmv" name="MediaPlayer1" width=360 height=260 AutoStart=true></EMBED></object></p>
</body></html>
This code will stream .asf or .wmv files
the first lines of the post
depending on the script/controls/parameters of the pplayer you select
<a href='#' onclick='player.src="file.mp3";'>Play file</a> this is a simple wmp, because the code is in my head already, get the correct code off the flash plyer howto page
is there any part of get the correct code from the flash player web site that I can make clearer, the parameters for the player will be different
using a server side script, ajax, or other the urls do not have to be displayed,
tried to answer 'Is this possible' (yes its possible) and suggest a mechanism and a place to get the right answer specific to you
get off your **expletive deleted** and do the search
foolproof, :)
depending on the script/controls/parameters of the pplayer you select <a href='#' onclick='player.src="file.mp3";'>Play file</a>
this is a simple wmp, because the code is in my head already, get the correct code off the flash plyer howto page
<a href="http://www.microsoft.com/windows/windowsmedia/player/download/">
<IMG ALT="Get Windows Media Player" src="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" WIDTH="88" HEIGHT="31" BORDER="0"></a><br>
<OBJECT ID="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<PARAM NAME="fileName" VALUE="">
<PARAM NAME="showControls" VALUE="true">
<PARAM NAME="PlayCount" VALUE="0">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="" name="MediaPlayer1" width=360 height=260 AutoStart=true></EMBED></object>
<a onclick="MediaPlayer1.SRC='thisfile';MediaPlayer1.fileName='thisfile';">Play This file</a><br>
<a onclick="MediaPlayer1.SRC='thatfile';MediaPlayer1.fileName='thatfile';">Play That file</a><br>
<a onclick="MediaPlayer1.SRC='nuthafile';MediaPlayer1.fileName='nuthafile';">Play nutha file</a><br>
loads the player and places it on the page (without playing untill a link is clicked)
this non-link(copy n paste with appropriate editing of the yoursite string) may assist in developing for mobile without paying data charges on the mobile
http://demo.opera-mini.net/demo.html?www.yoursite.com
there are any number of user-agent detector scripts that can be used to redirect to a subdomain for mobile browsers,
iconized images to display on tiny screens
high contrast for poor lcd
shoot me down in flames, I could be very wrong
but a while back I think I read on MSDN
notify is a reserved word in the IE DOM,
it may require a name change for that ID
http://msdn.microsoft.com/en-us/library/aa753746(VS.85).aspx
I'm sure printing can be restricted, but the save as copy simply can't because if I can read the bytes and store them in memory (in order to display the PDF), I can store them on disk. THat's nothing to do with the PDF itself. It's at the dat level underneath that.
If you can show me a PDF on a site which claims that it cannot be saved, post the URL here and I'll be happy to demonstrate how I can save a copy.
True, "display in the browser" downloads a copy in the TIF, you can drag that copy anywhere
I have Acrobat, not reader, and can add restrictions on printing, but screen capture utilities can override that
sorry bloke
Its been forever since I used frames,
in my mind it was like tabbing between pages,
focus remains when you tab back
try http://www.richnetapps.com/automatically_highlight_current_page_in/ a webtute
at the very begininnig
What do you want to accomplish, do you want to browse the web and know 'how they did that'
Do you want to 'Do that'
and so forth.
Where the file is accessed by
<a href='download.php?file=thisfile.pdf'>download Thisfile.pdf</a>
mysql
<?php /*download.php*/
If (!$_POST['file']='') {
/* validate $_POST any amount of form validation this is just an exercise
or die('invalid information'); */
$con=mysql_connect("server","user","password");
if (!$con) { die('Could not connect: '.mysql_error()); }
mysql_select_db("my_db", $con);
mysql_query("INSERT INTO downloads (FirstName, LastName, Company, email, telephone, file) VALUES ('$_POST['Firstname']', '$_POST['Lastname']', '$_POST['Company']', '$_POST['email']', '$_POST[telephone]', '$_POST['file']')");
$path=''; //full path outside the root to downloadable files
header("Content-disposition: attachment; filename=$_POST['file']");
header('Content-type: application/pdf;');
readfile("$path$_POST['file']"); }
else {echo '<form action="'.$_SERVER['php_self'].'" method="post">';
.'<input name="file" type="hidden" value="'.$file.'">';
.'Firstname ?<input name="Firstname" type="text"><br>';
.'lastname ?<input name="Lastname" type="text"><br>';
.'Company ?<input name="Company" type="text"><br>';
.'email ?<input name="email" type="text"><br>';
.'telephone ?<input name="telephone" type="text"><br>';
.'<input name="go" type="submit" Value="Download file"></form>'; }
?>
csv text file
<?php <?php /*download.php*/
If (!$_POST['file']='') {
/* validate $_POST any amount of form validation this is just an exercise
or die('invalid information'); */
$file = "./logfiles/logfile.csv";// define the text file, named as .csv excell can open it.
$fp = fopen($file, "a+");//open the text file for writing.
fputs ($fp, "$_POST['Firstname'],$_POST['Lastname'],$_POST['Company'],$_POST['email'],$_POST[telephone],$_POST['file']\n");
fclose($fp);
$path=''; //full path outside the root to downloadable files
header("Content-disposition: attachment; filename=$_POST['file']");
header('Content-type: application/pdf;');
readfile("$path$_POST['file']"); }
else {echo '<form action="'.$_SERVER['php_self'].'" method="post">';
.'<input name="file" type="hidden" value="'.$file.'">';
.'Firstname ?<input name="Firstname" type="text"><br>';
.'lastname ?<input name="Lastname" type="text"><br>';
.'Company ?<input name="Company" type="text"><br>';
.'email ?<input name="email" type="text"><br>';
.'telephone ?<input name="telephone" type="text"><br>';
.'<input name="go" type="submit" Value="Download file"></form>'; }
?>
its called CSS, cascading style sheets
a basic tutorial is http://www.w3schools.com/css/
simply you put a link in the head of each file to the stylesheet
and in the stylesheet define the look of the page
every page looks like the style
change the style sheet, change every page
When you get some code written, it is very much the same as the style in <head> or the width= background= attributes of plain vanilla html, there is a forum dedicated to css, next door to this one, html & CSS forum and there are code mavens who can answer and suggest
CSS :: no longer need tables for layout, position every element where you want it, tighter faster code, less to debug
dont use javascript
use css
the focus or active attributes
<style type='text/css'>
#link1 { background-image: url(Pic11.jpg); }
#link1:active { background-image: url(Pic12.jpg); }
#link1:focus { background-image: url(Pic12.jpg); }
#link2 { background-image: url(Pic21.jpg); }
#link2:active { background-image: url(Pic22.jpg); }
#link2:focus { background-image: url(Pic22.jpg); }
#link3 { background-image: url(Pic31.jpg); }
#link3:active { background-image: url(Pic32.jpg); }
#link3:focus { background-image: url(Pic32.jpg); }
#link4 { background-image: url(Pic41.jpg); }
#link4:active { background-image: url(Pic42.jpg); }
#link4:focus { background-image: url(Pic42.jpg); }
</style></head><body>
<DIV ID="nav" align="center">
<TABLE border="0" cellpadding="0" cellspacing="0" width="317px" height="23px">
<TR>
<TD width=47px><a id='link1' href="home.html" class="bhome" target='myframe'></a>
<TD width=80px><a id='link2' href="werkwijze.html" class="bwerkwijze" target='myframe' name="werkwijze"></a>
<TD width=65px><a id='link2' href="diensten.html" class="bdiensten" OnClick="this.style.backgroundImage='url(gifs/buttons/diensten2.gif)'" target='myframe'></a>
<TD width=59px><a href="nieuws.html" class="bnieuws" target='myframe'></a>
<TD width=66px><a 'id=link4' href="contact.html" class="bcontact" target='myframe'></a>
</TABLE>
</DIV>
focus and active, IE and Mozilla
I find it simpler, to have a transparent.gif for menu images
<style type='text/css'>
a:focus {background:#de7777;}
a:active {background:#de7777;}
</style>
<a href=menubla target=menu.bla><img src='menuimg.gif' width='33' height='33'></a>
and change the background color of the focused choice
2 code lines, any number of menu choices
second code runs on my ide,
<?php
class CreateAccountPage {
public function __construct() {}
public function title() { return 'Create Account'; }
public function inlineStyle() { return <<<EOSTYLE
label { margin-top:0.5em; display:block; font-family:Arial, Helvetica; font-size: 10pt; color: #444; }
EOSTYLE;
}
public function processRequest() { /* first process any incoming POST data */ if(isset($_POST) and count($_POST) != 0) { $this->processIncomingFormData(); } /*now emit page content*/
$titleText = $this->title();
$inlineStyle = $this->inlineStyle();
$this->emitHeaders($titleText, $inlineStyle);
echo "<body>\n";
$this->generateBodyContents();
echo "</body>\n";
echo "</html>\n"; }
protected function generateBodyContents() { echo <<<EOCONTENTS
<h3>Create a New User Account</h3><form method="post" action="SubmitAccountData.php" name="create_user_form"><div><label>User Name:</label><input type='text' name='user_name' size='30'></div><div><label>Full Name:</label><input type='text' name='full_name' size='30'></div><div><label>Password:</label><input type='password' name='password1' size='20'></div><div><label>Password (confirm);</label><input type='password' name='password2' size='20'></div><div><label>Email Address:</label><input type='text' name='email_address' size='30'></div><p><input type='submit' value='Create User'></p></form>
EOCONTENTS;
}
protected function emitHeaders($titleText, $inlineStyle) { echo <<<EOHEADERS
<html><head><title>{$titleText}</title><style type='text/css' media='all'>body { font-family: Arial, Hervetica; }{$inlineStyle}</style></head>
EOHEADERS;
}
protected function processIncomingFormData() { /* enter user page doesn't care about form data*/ } }
$page = new CreateAccountPage();
$page->processRequest(); ?>
packs down well
<label> tags have only real value for buttons, radio buttons, to make titles clickable, in this context they are unneccessary
CREATE TABLE Employee
(
Emp_Id int PRIMARY KEY IDENTITY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
postalcode vachar(6),
/* other columns*/
)
not sure about sql server, identity SHOULD be the keyword to make it autoincrement
<body onload='history.go(-2)'></body>
never left out a colon?
its a typo, Human error <a href="http://www.w3.org/style/CSS" style="{color: blue; background: white} :visited {color: green} :hover {background: yellow} :visited:hover {color: purple} "> Example of a hyperlink to the CSS home page with special one-off visited and hover effects. </a>
sorry misunderstood, thought they were using the web service
I just tried the html to pdf on the link provided
xhtml strict
css3
reproduced the page perfectly
perhaps the probem is the type of conversion chosen
direct entered code rather than url
external stylesheet
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://www.yoursite.com/style.css">
</head>
<body>
bla bla bla
</body>
</html>
with style.css containing amid the other styles
a:hover { background-color: blue; color: white; }
header styles
<html>
<head>
<style type='text/css'>
<!--
a:hover { background-color: blue; color: white; }
-->
<style>
</head>
<body>
bla bla bla
</body></html>
inline styles
<html>
<head>
</head>
<body>
<a href='thisfile' style="hover { background-color: blue; color: white; }" > thisfile </a>
</body>
</html>
most use external stylesheets
only one file need be altered to update the whole site
header styles, contain the full stylesheet in every page
inline styles contain the full style in every link on every page
they get exponentially bigger
each has a purpose
external stylesheet to style a site
header style to make a single page different
inline style to make a single element different
server processing, the google search would be for, apache mod_rewrite
too, have index.php in the folder and link to the folder
also works when you dont want the folder directly linkable
index.php/index.html/default.asp in those folders - a permanent redirect to where you do want them to go
the explanation of the desired function of the script is correct.
but
the script will not work as expected
rollover images are not preloaded
the first time any affected image is rolled over the new image will be downloaded from the server, Nothing will happen for the time that the download takes
the user gets no feedback
absolutely nothing
suggest a different script, or the part of the script that calls the loads the second images be moved out of the functions, to just before the </body> tag so that images appear to mouseover properly
<html>
<head>
<script type='text/javascript'>/* code to control mouseover effect that part of the original script is not totally useless */ </script>
</head>
</body>
Bla bla bla (body html)
<script type="text/javascript">
//<![CDATA[
<!--
image1 = new Image();
image1.src = "http://pics.mysite.com/thisimage.1._on.gif";
image2 = new Image();
image2.src = "http://pics.mysite.com/thisimage.2._on.gif";
image3 = new Image();
image3.src = "http://pics.mysite.com/thisimage.3._on.gif";
image4 = new Image();
image4.src = "http://pics.mysite.com/thisimage.4._on.gif";
//-->
//]]>
</script>
</body>
</html>
In the example above image loading is separated from image display
functions to control the display of mouseover images are defined in the head,
the page is fully loaded,
then last,
after the page is rendered mouseover images for image anchors in the body are loaded. the user does not see any delay in page display onload, nor does the page pause during mouseover
If your site delays in …
the javascript calls the php script on the server and writes the returned html into the same div p or other tag that the original was written
The JQuery library has good instructions and basic tutorials http://docs.jquery.com/Tutorials/
I dont like tables much, but for tabular data like this they Work :)
try
<table rules='rows' class='tbl_Size_Chart' >
<caption>Size Chart - Children</caption>
<tr class = "row_height"><!-- Row 1 -->
<th >Size</th><!-- Col 1 -->
<th > 2 </th><!-- Col 2 -->
<th > 4 </th><!-- Col 3 --><!-- will give the same resulat as below, css inherits too lazy to edit much out of cut n paste-->
<th class = "row_height"> 6 </th><!-- Col 4 -->
<th class = "row_height"> 8 </th><!-- Col 5 -->
<th class = "row_height"> 10</th><!-- Col 6 -->
<th class = "row_height"> 12</th><!-- Col 7 -->
<th class = "row_height"> 14</th><!-- Col 8 -->
</tr>
<tr class = "row_height"><!-- Row 2 -->
<th class = "row_height">Chest</th><!-- Col 1 -->
<td class = "row_height">58</td><!-- Col 2 -->
<td class = "row_height">61</td><!-- Col 3 -->
<td class = "row_height">64</td><!-- Col 4 -->
<td class = "row_height">69</td><!-- Col 5 -->
<td class = "row_height">73</td><!-- Col 6 -->
<td class = "row_height">76</td><!-- Col 7 -->
<td class = "row_height">81</td><!-- Col 8 -->
</tr>
<tr class = "row_height"><!-- Row 3 -->
<th class = "row_height">Waist</th><!-- Col 1 -->
<td class = "row_height">53</td><!-- Col 2 -->
<td class = "row_height">55</td><!-- Col 3 -->
<td class = "row_height">58</td><!-- Col 4 -->
<td class = "row_height">60</td><!-- Col 5 -->
<td class = "row_height">64</td><!-- Col 6 -->
<td class = "row_height">68</td><!-- Col 7 -->
<td class = "row_height">72</td><!-- Col 8 -->
</tr>
<tr class = "row_height"><!-- Row 3 -->
<th class = …
so the end result is an enhaced tooltip,
specific to the region/anchor/link that is clicked
this code sample creates a layer, that embeds in any page to provide tooltips without any external file calls that could be considered security risks
<style type='text/css'>
.bottom { position:fixed; top:20px; left:10px; width:45%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid; }
</style>
<script type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(layer) {
if (dom) {document.getElementById(layer).style.visibility='hidden';}
if (document.layers) {document.layers[layer].visibility='hide';} }
function showIt() {
if (dom) {document.getElementById(layer).style.visibility='visible';}
if (document.layers) {document.layers[layer].visibility='show';} }
function placeIt() {
if (dom && !document.all) {document.getElementById(layer).style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
if (document.layers) {document.layers[layer].top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
if (document.all) {document.all[layer].style.top = document.body.scrollTop + (document.body.clientHeight - (document.body.clientHeight-y1));}
window.setTimeout("placeIt()", 10); }
window.onload=placeIt;
--></script>
<a title='click for tip about this item' id="tooltip1" href='#' onClick="showIt('layer1');">knife tooltip</a><span id='layer1' class='bottom'>thumbs go over knives <br>knives should not go over thumbs<br><button id="close1" onClick="hideIt('layer1');">Close</button></span>
<a title='click for tip about this item' id="tooltip2" href='#' onmouseover="showIt('layer2');">hammer tooltip</a><span id='layer2' class='bottom' >heads and hammers dont mix<br><button id="close1" onClick="hideIt('layer2');">Close</button></span>
the javascript checks for supported browser DOM and uses the appropriate script for each browser family, so should work on all browsers
the anchors representing the click me for tooltip, and the actual tooltips can be saparated they do not have to be together, the 'popups' will still appear in place and remain visible over the page when the page scrolls
why javascript
javascript is blocked on a large proportion of the potential market
passing as a url, the page is being reloaded
best practice; prepare the page serverside, then you can be sure its working as intended
the whole thing appears to be able to be a single php script,
but the description of the task, is terribly incomplete,
post the code in whole there may be something simple
IF you want to integrate javascript and php examine AJAX
<?php
if (!$text) {die('No text selected');}
elseif($text='this') {echo '<div class="topbar">anything you like, once php has processed it its just html goes here</div>'; }
elseif($text='that') {echo '<div class="topbar">anything else you like, once php has processed it its just html goes here</div>'; }
switch ($text) {
case '':
die('No text selected');
break;
case 'this':
echo '<div class="topbar">anything you like, once php has processed it its just html goes here</div>';
break;
case 'that':
echo '<div class="topbar">anything else you like, once php has processed it its just html goes here</div>';
include ("./menu.php");
echo "<br class='dontprint'><p style='margin:0;padding:0'>Property rules<br>All properties are subject to the following landlord's rules<br>Characters in <i>italic</i> text refer to definitions, acts, and regulations. <br><b><i>Motor Vehicle Act 1989 R.S.,c.293,s.1</i></b> hereafter referred to as (<b><i>MVA</i></b>)<br><b><i>Protection of Property Act 1989 R.S.,c.363,s.1.</i></b> hereafter referred to as (<b><i>PPA</i></b>) <br><b><i>Residential Tenancies Act 1989 R.S.,c.401,s.1</i></b> hereafter referred to as (<b><i>RTA</i></b>) <br><b><i>Domestic Violence Intervention Act. 2001, R.S.,c. 29, s. 1. </i></b><i> </i>hereafter referred to as (<b><i>DVIA</i></b>)<br><b><i>Smoke-free Places Act. 2002 R.S.,c.12.s.1</i> </b>hereafter referred to as (<b><i>SFPA</i></b>)<br>All regulation definitions and interpretation of the above and all Federal Provincial and Local Laws bylaws and Regulations are confirmed.<br><b>Discrimination is unlawful.</b> The intent of this and all other Apartments documents is not to discriminate. At all times, any word, phrase, mode of speech, that may be considered gender specific or exclusive is to be read and interpreted as gender neutral or inclusive.<br><b>Definitions:</b> For the purpose of these rules:<br><blockquote style=\"margin:0; margin-left:15px;padding:0;\"><b>Tenant </b>shall be those residents signatory to the lease<br><b>Resident</b> shall include all persons lawfully resident in the …
using :: file.php?text=this as example
if else
<?php
if (!$text) {die('No text selected');}
elseif($text='this') {echo '<div class="topbar">This Text goes here</div>'; }
elseif($text='that') {echo '<div class="topbar">That Text goes here</div>'; }
?>
switch / case
switch ($text) {
case '':
die('No text selected');
break;
case 'this':
echo '<div class="topbar">This Text goes here</div>';
break;
case 'that':
echo '<div class="topbar">That Text goes here</div>';
break;
}
safari is apple,
if a mac does the mac have windows media installed
from the "get windows media player" link included in the original script, that part of it works anyway
simpler than it looks . . .
the url http://www.thissite.com/thisfolder/
is a url to the folder not to a file
when the folder opens, the default file
index.php index.html default.asp or whatever is appropriate to the server configuration opens and runs
in the same way as http://www.thissite.com/ acutally opens http://www.thissite.com/index.html
to make your urls do this, put a default file in the folder and make urls reference the folder
In apache servers mod_rewrite can trim all displayed urls to the folder name
<script type="text/javascript">
<!--//
function setplay(thisfile,ww,hh) {
document.getElementById("MediaPlayer1").src=thisfile;
document.getElementById("MediaPlayer1").style.width=ww;
document.getElementById("MediaPlayer1").style.height=hh;
}
//-->
</script>
<p><a href="http://www.microsoft.com/windows/windowsmedia/player/download/"><img alt="Get Windows Media Player" src="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif"width="88" height="31" border="0"></A><br>
<object id="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="fileName" value="">
<param name="showControls" value="true">
<param name="PlayCount" value="0">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="" name="MediaPlayer1" width=360 height=260 AutoStart=true></embed></object></p>
<a onclick='setfile("thisfile.wmv","480","300");' > Play thisfile </a><br>
<a onclick='setfile("thatfile.wmv","400","320");' > Play thatfile </a>
try styling unordered lists
not sure, but, the default style for lists has a whitespace between li elements
ul {margin:0; padding:0;}
ul li {margin:0; padding:0;}
firefox has video handling issues, ? I dunno
it is not specific code to IE
it works in opera safari IE firefox but only for .asf .wmv files, streaming media files
.avi is not a streaming format, the file is indexed at the end,
@ AB:
Is the $file variable = $countfile? I couldn't see it referenced previously.
Thanks, Ardav, the obvious error, wasnt obvious when I looked at it first time, i searched for bugs, and missed it
$form_id = file_get_contents( $countfile ) + 1;
the editor I am trying this time tries to complete the code, great when you can't remember the parameterss, lousy when you walk away to grab a coffee and havent completed the line
<?php if ($_POST['email']) { /* check whether the file is loading from the post and assign values to the variables */
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$address=$_POST['address'];
$telephone=$_POST['telephone'];
$countfile = "/cgi-bin/countforms.bcnt"; /* define the file containing the count */
$outfile = "/cgi-bin/outputforms.csv"; /* define the file containing the form data, in this case a .csv text file containing 1 row of each form submitted */
$form_id = file_get_contents( $file ) + 1; /* read the last form number and increment */
$fp = fopen($file, 'w'); /* open the couint file and erase the contents */
fputs ($fp, sprintf('%06d',$form_id)); /* put the new count number to the count file
fclose($fp);
$fo = fopen($outfile,'a+'); /* open the output file to append the new data to the end /*
fputs ($fo, "$form_id,$firstname,$lastname,$email,$address,$telephone\n"); /* write the form to the output file */
fclose($fo);
}
else {
$firstname=$lastname=$email=$address=$telephone=" "; /* blank all data fields */
$form_id='id will be generated on submission'; /* information prompt */
} ?>
<form action='<?php echo $_SERVER['PHP_SELF']; ?>' method='post'>
<div>ID= <?php echo $form_id." Please record this number for your records"; ?></div>
Firstname <input type=text name='firstname' value="$firstname" />
Lastname <input type=text name='lastname' value="$lastname" /><br />
Email <input type=text name='email' value="$email" />
Address <input type=text name='address' value="$address" /><br />
telephone <input type=text name='telephone' value="$telephone" /><br />
<?php if (!S_POST['email']) {echo "<input type='submit' name='submit' value='submit' />" ;} else { echo "thank you"; }
</form> <!-- normal html form -->
the form submits to itself, on submission it writes the id number into the id field and …
given that countforms.bcnt is a file in the cg-bin directory chmod writeable contents
000000
outputforms.csv is a file in the cgi-bin directory chmod writeable contents
ID,First name, Lastname,email,address,telephone
<?php if ($_POST['email']) {
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$address=$_POST['address'];
$telephone=$_POST['telephone'];
$countfile = "/cgi-bin/countforms.bcnt";
$outfile = "/cgi-bin/outputforms.csv";
$form_id = file_get_contents( $file ) + 1;
$fp = fopen($file, 'w');
fputs ($fp, sprintf('%06d',$form_id));
fclose($fp);
$fo = fopen($outfile,'a+');
fputs ($fo, "$form_id,$firstname,$lastname,$email,$address,$telephone\n");
fclose($fo);
}
else {
$firstname=$lastname=$email=$address=$telephone=" ";
$form_id='id will be generated on submission';
} ?>
<form action='<?php echo $_SERVER['PHP_SELF']; ?>' method='post'>
<div>ID= <?php echo $form_id." Please record this number for your records"; ?></div>
Firstname <input type=text name='firstname' value="$firstname" />
Lastname <input type=text name='lastname' value="$lastname" /><br />
Email <input type=text name='email' value="$email" />
Address <input type=text name='address' value="$address" /><br />
telephone <input type=text name='telephone' value="$telephone" /><br />
<input type='submit' name='submit' value='submit' />
</form>
not fully tested, creates a csv file of the submitted forms to be loaded into excell, there are dozens of mail handlers already
the input validation is USELESS, I didnt take any care of it, this is a proof of concept not a 'good' script,
have you examined elements sized in ems and %, per W3C recommendations,
to produce pages that do self adjust to window
px are not best practice
Thank you for the padding code,
I had in mind before posting, messed up on posting.
It is actually possible to generate something that is both random and unique (the latter via a test against a history list).
then it is no longer random, could roll a 6 on a die a hundred times consecutively.
unique, and random are mutually exclusive
is probably easiest to serialize
create a file, in this case i keep it in cgi-bin, called countforms.bcnt if you change the name change it for all occurrences in the scritp
chmod writeable to the user that php runs under
contents six digits
000000
then
<?php $file = "/cgi-bin/countforms.bcnt";
$form_id = file_get_contents( $file ) + 1;
$fp = fopen($file, "w");
fputs ($fp, "$form_id");
fclose($fp); ?>
<input type='hidden' name='form_id' value='<?php echo $form_id; ?>'>
maybe not the best way, but one way
or you could have the script only write the updated serial number on form submit so that the number does not increase crazily
cgi scripts are often self documented
if you open them as text there are often instructions in them that show the configuration options
options are often entered as hidden inputs in the form so the script can handle multiple forms
but it depends on the form handler script
you will have to find the options for the particular script on your
"/bin/script_library/form_handler_mail"
?? about 1/3 chance sorry
<INPUT TYPE="hidden" NAME="end_display" VALUE="http://www.YOURLINK.com">
<INPUT TYPE="hidden" NAME="required" VALUE="field1,field2,field3">
<INPUT TYPE="hidden" NAME="email_to" VALUE="yourname@somewhere.com">
the last one is sort of important there can only be 1 action in a form
i've used 2nd way(without session)...
i retrived value from DB & stored in a new variable...
i dont know where to echo that variable r else..could u help?
Just replace the $_SESSION variable in the posts above, with your variabl <input bla bla <?php if($variable='red') { echo "checked"; }} ?> >
Yes, I understand that the 'search' name is for store the result of concat. But how to define? As new variable before or as new empty column in the databese table?
Nothing
searchme is a calculated column, it is created and defined during the query and only exists until the query is complete, it takes the format of the colums from which it is created
it can, but sessions are actually easier
returning the value from a sql query the results can be directly assigned to a variable, instead of through the session array,
the session means the information is persistent until the session is closed,
much better if the information has to be retained, without posting it through post or get values between each file
It would probably be best, to spend the relatively short time needed to learn how to create use and destroy sessions
than the extra coding needed to pass the variables back through html gets or posts
html
with clickable label
<input type="radio" name="color" id='red' value="Red" <?php if ($_SESSION['color'] == 'Red') {echo 'checked';}?>><label for='red'> Red</label><br>
<input type="radio" name="color" id='blue' value="Blue" <?php if ($_SESSION['color'] == 'Blue') {echo 'checked';}?>><label for='blue'> Blue</label><br>
<input type="radio" name="color" id='yellow' value="yellow" <?php if ($_SESSION['yellow'] == 'yellow') {echo 'checked';}?>><label for='yellow'> Yellow</label><br>
xhtml
with clickable label
<input type="radio" name="color" id='red' value="Red" checked="<?php if ($_SESSION['color'] == 'Red') {echo 'checked';}?>" /><label for='red'> Red</label><br>
Case altered, 'Red' does not equal 'red'
radio button groups have the same name, that name should be the same name as the value being examined in the $session array, or the response will always be negative/nul/0/no
most sites expire the posts, individual operators can set the expiry dates, and how they expire, whether deleted or sent to an archive of 'old' threads
we have multiple ads on sites, from the referrer there are links from old posts on blog sites, google still keeps indexed, after they have disappeared from the menu in the blogsite
((keep the "appropriate'' thing flying) everyone has seen replies in newsgroups from spammers that have the same reply to every post in the group, gets them killed out of SE instead of raised)
If your post and signature/link is not a woftam, of value in the thread, it should get your site noticed
<a href="/media/video/cartoons/Star123.flv" style="display:block;width:520px;height:330px" id="player"> click to play from a folder (root foldername)</a>
<a href="../../media/video/cartoons/Star123.flv" style="display:block;width:520px;height:330px" id="player"> click to play from a relative folder(up 2 then down)</a>
<a href="http://www.someothersite.com/somefolder/somesubfolder/Star123.flv" style="display:block;width:520px;height:330px" id="player"> click to play from anywhere on the web</a>
alias, we don need no steenkin alias
hth dos v'danye
The left image is native 428*536 91.71KB jpg
enlarged it is html resized to 900 * 1100
this image a jpg with little or no compression will scale up like that without image degradation,
any problem comes when, the total size of the images makes page loading take solong that users click away
thats why there are only two images on each page
Note that television, std def, is only 320 dots wide even on a 50inch screen, and most people don't notice the poor resolution