Jump to content

Recommended Posts

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
[code]
<?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
?>
[/code]

thank you
anatak
Link to comment
https://forums.phpfreaks.com/topic/9372-buttons-as-links/
Share on other sites

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 ?
Link to comment
https://forums.phpfreaks.com/topic/9372-buttons-as-links/#findComment-34551
Share on other sites

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

[code]
<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>
[/code]

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

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

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

     case '$case02 ' :
         code for case02;
         break;
}
[/code]

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
Link to comment
https://forums.phpfreaks.com/topic/9372-buttons-as-links/#findComment-34890
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.