Jump to content


Photo

buttons as links


  • Please log in to reply
2 replies to this topic

#1 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 407 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 09 May 2006 - 09:14 AM

can someone help me with this ?
I use buttons as links and it works fine in Mozilla but not in IE
is there a way to do this in IE too ?

Please look over here to see the buttons [a href=\"http://www.kyushunetwork.com/index.php?page=list_home\" target=\"_blank\"]kyushunetwork[/a]

here is the script that generates the buttons for the navigation in the left menu
<?php
//    echo 'navigation guest';
//    comment start: START nested tabel voor navigatie menu
//    comment end -->
$local_time=local_time();

?>
         <table class="nav">
        <tr>
        <td class="nav"><?php echo date("F jS, Y", strtotime(local_time())) ?></td>
        </tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=register1"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu01'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_home"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu02'];?></button>
        </a></td></tr>
        
        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_event"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu03'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_article"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu04'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_review"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu05'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_members"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu06'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=list_picture"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu07'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=faq"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu08'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=about"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu09'];?></button>
        </a></td></tr>

        <tr><td class="nav"><a href="<?php echo $_SERVER['PHP_SELF']."?page=contact"; ?>">
        <button class="nav" name="navigation" value="contact us" type="submit"><?php echo $Row['Menu10'];?></button>
        </a></td></tr>

        </table>
<?php
//    comment start: END nested tabel voor navigatie menu
//    comment end
?>

thank you
anatak
takasi.8008@docomo.ne.jp
tourokum@0508.jp

#2 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 407 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 09 May 2006 - 09:59 AM

I found a way to make this work by using onclick="window.location='LINK'"
this is a solution that works not very well under IE.

and on another subject
is there a way to make a button that sends a value to the server DIFFERENT from the text displayed on the button in IE ?
in Mozilla it works fine but M$ did not implement it so under IE it does not work.

anyone ideas how to work around this ?
takasi.8008@docomo.ne.jp
tourokum@0508.jp

#3 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 407 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 10 May 2006 - 12:11 PM

The buttons of the navigation menu are working (not ideally but they are working)
because they are links they did not gave me so much trouble

Now I have another problem ;)

the buttons of the forms are not working yet
so I thought I had a clever solution but of course there is something that does not work.

Here is the form that generates the login table in the left hand top corner

<FORM method="POST" action="<?php echo $_SERVER['PHP_SELF'] . "?page=authenticate"?>" >
<?php
//        comment start: START nested tabel voor login form
//        comment end
?>
<TABLE width ="100%" border ="1" cellpadding ="2" cellspacing ="0">
<TR>
<TD align = "left" valign = "top">Name</TD>
<TD><INPUT size="12" type="text" name="UserHandle"></TD>
</TR>
<TR>
<TD align="left" valign="top">Password</td>
<TD><INPUT size="12" type="password" name="UserPassword"></td>
</TR>
<tr>
<td colspan="2">
<BUTTON name="submit" value="<?php button_caption(1) ?>" type="submit"><?php button_caption(4) ?></BUTTON>
<BUTTON name="clear" value="Clear" type="reset"><?php button_caption(2) ?></BUTTON>
</td>
</tr>
</TABLE>
<?php
//        comment start: END nested tabel voor login form
//        comment end
?>
</FORM>

button_caption() is a function that gets the right caption out of the database and puts it on the button

the problem is that I check what is sent by a switch{} statement

switch ($_REQUEST['submit'])
 {
     case 'Log in' :
    //put all the code below in an include
$userhandle = $_POST['UserHandle'];
$userpassword = $_POST['UserPassword'];

what I would like to do is to check for the value of a variable
Ideally would be something like this
$case01 = button_caption(1); 
$case02 = button_caption(2);
switch ($_REQUEST['submit'])
 {
     case '$case01 ' :
         code for case01;
         break;

     case '$case02 ' :
         code for case02;
         break;
}

is this possible ?
I think I have to post this in another forum but I will give it a shot here first as this is connected to my original problem

thanks
anatak
takasi.8008@docomo.ne.jp
tourokum@0508.jp




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users