Jump to content

Recommended Posts

The html is being produced invalidly, so this may help

 

echo '<a href="list_courses.php?id='.$row['course_id'].'"><p>'. $row['type']. ' :'.$row['course_name'].'</p></a><hr />';

 

personally I prefer to use sprintf to build strings from pieces, or here use printf.

I just find it easier to read

printf("<a href=\"list_courses.php?id=%d\"><p>%s:%s</p></a><hr>",$row['course_id'],$row['type'],$row['course_name']);

I see thanks for your help.

 

Unfortunately its still just closing the box even with your revisions, i believe its because its within

<div id="caja">';

 

which is what i am using so the box expands to display all the courses related to that school

 

and i beleive this bit of functionality,

 

$("#mostrar").click(function(event) {
event.preventDefault();
$("#caja").slideToggle();
});

$("#caja a").click(function(event) {
event.preventDefault();
$("#caja").slideUp();
});
});

 

uses any link within the caja div make the box expand.

 

Which is fine if i have normal text init but because im using a link it takes the expand function.

 

Do you know a way i can get around this?

 

I hope that made some sense

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.