Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8337181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:13:29+00:00 2026-06-09T04:13:29+00:00

my el6.href and el7.href doesn’t work, if I place el6.href and el7.href at top

  • 0

my el6.href and el7.href doesn’t work,

if I place el6.href and el7.href at top of el4.href and el5.href IT WORKS but as consequence el4. and el5 won’t work,
any tips?

script

el4 = document.getElementById("edit_href");
el5 = document.getElementById("delete_href");   
el6 = document.getElementById("approve_href");
el7 = document.getElementById("deny_href");


el4.href = "../article/submit-article.php?";        
el5.href = "myaccount.php?mydraft=true&delete=true";

el6.href = "myaccount.php?rec_approved=true&approve=true";
el7.href = "myaccount.php?rec_denied&deny=true";

php

if(isset($_GET['mydraft']))
{echo"
    < href=''  id=edit_href >edit</a>
    <a href='' id=delete_href >delete</a>";
}
if ( (isset($_GET['rec_waiting'])) || (isset($_GET['rec_denied'])) )
    {echo"  
        <a href='' id=approve_href  >approve</a>";

        if(!isset($_GET['rec_denied']))
        {echo"  
        <a href='' id=deny_href >deny </a>";
        }
    }   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:13:30+00:00Added an answer on June 9, 2026 at 4:13 am

    Javsscript code need not null judgment.because some element is null.look this.

        el4 = document.getElementById("edit_href");
        el5 = document.getElementById("delete_href");   
        el6 = document.getElementById("approve_href");
        el7 = document.getElementById("deny_href");
    
    
            if(el4!=null){
            el4.href = "../article/submit-article.php?";        
            el5.href = "myaccount.php?mydraft=true&delete=true";
        }
    
        if(el6!=null){
        el6.href = "myaccount.php?rec_approved=true&approve=true";
    }
        if(el7!=null)
    {
        el7.href = "myaccount.php?rec_denied&deny=true";
    }
    

    HTML documnet is From top to bottom of the execution.if Appear the wrong in javascript tag middle.So the code after will not be executed

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everything works fine on my OS X development laptop. Deploy the app to production
The following occurs in a linux 2.6.32-220.7.1.el6.x86_64 and g++ 4.4.6 . The following code:
I've been searching around for this error but can't find anything. I'm trying to
i want to use memsql,but its so slowly when i test it use mysql
I have a input file with the following example data. kernel_version hostname 2.6.32-220.el6.x86_64 www01.dc1.domain.com
I'm trying to compile a test file: gcc -o test test.c -lg2c but I
I'm stomped. While as root: root@web01 [~]# uname -a Linux web01 2.6.32-71.29.1.el6.x86_64 #1 SMP
I'm trying to update a PHP module using yum, but am getting an error.
I have Mercurial 1.4 in my CentOS6, but I need to use the Eclipse
I have a working code running on a RedHat installed Linux with kernel 2.6.18-194.el5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.