Jump to content

GET method


djp1988
 Share

Recommended Posts

I am using the get method to send hidden content data through to a "template" page in order to show my videos (to avoid making a page per video) and so everything is okay only, I didn't like to look of the submit button, and i was wondering if i could just have some text with a link that sends data and not use a button... is this possible? Have a look at what I mean:http://www.actionscriptcoding.com/Experiments/E02f08.phpYou click the button which goes to a php page, the variables inserted have been defined by me in function to the document I want to display:the handle page:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="<?php print $_GET['width']; ?>" height="<?php print $_GET['height']; ?>" title="<?php print $_GET['title']; ?>">  <param name="movie" value="<?php print $_GET['urlSWF']; ?>" />  <param name="quality" value="high" />  <embed src="<?php print $_GET['urlSWF']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?php print $_GET['width']; ?>" height="<?php print $_GET['height']; ?>"></embed></object>

and the form:

<form id="seeItInAction" name="seeItInAction" method="get" action="swfViewer.php">  <input type="hidden" name="width" value="550" />  <input type="hidden" name="height" value="400" />  <input type="hidden" name="title" value="Comet ActionScript animation" />  <input type="hidden" name="urlSWF" value="../swf/comet.swf" />  <label>  <input type="submit" name="Submit" value="See It In Action !" />  </label></form>

Link to comment
Share on other sites

Almost any element can be assigned an onclick handler, if that's what you're asking. As an example, this span could take the place of your button:<span onclick = 'myClickHandler(this.parentNode)'>Click me!</span>The function would look like this:function myClickHandler (formReference){ //do stuff formReference.submit();}

Link to comment
Share on other sites

If you use the mootools library, this could be a very easy thing to do.(go look it up, then include it through a script src= and then put this afterwards in a new script tag)

window.addEvent('domready',function(){  $$('form').each(function(item){	   var submit = item.getElementsBySelector('input[type="submit"]')[0];		submit.replaceWith(new Element('span',{'events':{click:function(i){ i.submit()}.pass(item);} }));  });});

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...