Members: 16,996
Threads: 38,868
Posts: 159,480
Online: 58

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Mambo 4.5.1 > Mambo 4.5.1 'How Do I' Questions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 23.02.2005, 11:57   #1 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 13
Aptonic is on a distinguished road
Default form problem in template.. (me dumb... me do not understand.)

Hi, i don't know if i am coming blind or what but i cant make this work in IE. works fine with Firefox... It's basic template chager modified to buttons. basicly what it does is it send and html form. and that's it. Nothing more, and jet, i can't make it work on IE. please help :'(

That upper code is directly from basic templater chager's print out.


orignal code:
<script language='JavaScript1.2' type='text/javascript'>
<!--
function showimage() {
//if (!document.images) return;
document.images.preview.src = 'templates/' + getSelectedValue( 'templateform', 'mos_change_template' ) + '/template_thumbnail.png';
}
function getSelectedValue( frmName, srcListName ) {
var form = eval( 'document.' + frmName );
var srcList = eval( 'form.' + srcListName );

i = srcList.selectedIndex;
if (i != null && i > -1) {
return srcList.options[i].value;
} else {
return null;
}
}
-->
</script>
<form action="/inprogress/s-vibe/index.php" name='templateform' method="post">

<select name="mos_change_template" class="button" onchange="showimage()">
<option value="backup">backup</option>
<option value="layout_blue" selected="selected">layout_blue</option>
<option value="layout_grey">layout_grey</option>
<option value="layout_lila">layout_lila</option>

<option value="layout_orange">layout_orange</option>
<option value="layout_red">layout_red</option>
</select>
<input class="button" type="submit" value="Valitse" />
</form>

----> and what i made from it, was ---->
<form action="" name="templateform" method="post">
<input name="mos_change_template" value="layout_blue" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_05.gif" >
<input name="mos_change_template" value="layout_grey" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_03.gif" >
<input name="mos_change_template" value="layout_lila" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_02.gif">
<input name="mos_change_template" value="layout_orange" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_01.gif">
<input name="mos_change_template" value="layout_red" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_04.gif" >
<input type="hidden" name="submit" value="Valitse">
</form>
Aptonic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 23.02.2005, 16:08   #2 (permalink)
Expert Mamber
 
scox's Avatar
 
Join Date: Jan 2005
Location: Graz, Austria
Posts: 288
scox is on a distinguished road
Send a message via ICQ to scox
Default Re: form problem in template.. (me dumb... me do not understand.)

action=""??

don't know might be the problem
scox is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 23.02.2005, 18:01   #3 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 13
Aptonic is on a distinguished road
Default Re: form problem in template.. (me dumb... me do not understand.)

Shouldn't it (if its empty) point to the file it was sent from. ..I changed it to <form action="<?php echo $mosConfig_live_site;?>/index.php" name="templateform" method="post"> and it didn't still work in IE. It still works on Firefox. <- the problem.
-AP
Aptonic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 25.02.2005, 12:37   #4 (permalink)
Expert Mamber
 
scox's Avatar
 
Join Date: Jan 2005
Location: Graz, Austria
Posts: 288
scox is on a distinguished road
Send a message via ICQ to scox
Default Re: form problem in template.. (me dumb... me do not understand.)

ok now i know it....
set the method to get and you will see the differnce.....


input type=image return values:
IE:
submit=Valitse&mos_change_template.x=15&mos_change _template.y=16
- the value of the hidden field submit
- coordinates of mos_cahnge_template (.x and .y)

FF:
mos_change_template.x=10&mos_change_template.y=7&m os_change_template=layout_orange&submit=Valitse
- coordinates of mos_cahnge_template (.x and .y)
- value of mos_change_template
- value of the hidden field submit

so IE does not send the reqired mos_change_template variable

you could use a radio button, with an onClick event or something like this....
scox is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28.02.2005, 15:04   #5 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 13
Aptonic is on a distinguished road
Default Re: form problem in template.. (me dumb... me do not understand.)

We shall name a day after u Thanx a million times. U pointed me to that error and now it is solved. It's not pretty but IT works. Here's a sample if some one else has the same problem.

<form action="<?php echo $mosConfig_live_site;?>/index.php" name="templateform" method="post">
<input value="layout_blue" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_05.gif" onClick="this.form.mos_change_template.value = 'layout_blue'">
<input value="layout_grey" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_03.gif" onClick="this.form.mos_change_template.value = 'layout_grey'">
<input value="layout_lila" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_02.gif" onClick="this.form.mos_change_template.value = 'layout_lila'">
<input value="layout_orange" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_01.gif" onClick="this.form.mos_change_template.value = 'layout_orange'">
<input value="layout_red" type="image" SRC="<?php echo $mosConfig_live_site;?>/templates/layout_blue/images/buttons_04.gif" onClick="this.form.mos_change_template.value = 'layout_red'">
<input type="hidden" name="submit" value="Valitse">
<input type="hidden" name="mos_change_template" value="">
</form>

so i added on onclick event that changes the value of hidden field named mos_change_template. So after this IE sends cordinates AND the value. It could be wiser to name those image input names to somethin else. 'Cos in FF it's doubled. And thanx again.
-Aptonic
Aptonic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with vanda1 template keejulian Template Discussions 4 28.01.2005 23:16
Template manager problem PeeWee Mambo 4.5 Bugs 1 10.05.2004 07:43
Problem with mt_business Template Maratos Mambo 4.5 'How Do I' Questions 1 29.04.2004 22:49
Template problem joost Mambo 4.5 General Talk 2 25.04.2004 11:44
template and editor problem Arek Template Discussions 0 16.04.2004 15:04


All times are GMT +2. The time now is 19:45.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.