/    Sign up×
Community /Pin to ProfileBookmark

showing different layers on page load

Hi guys,

I am relatively new to web design and need some help!

I have a page called index.asp which contains a left hand navigation bar and a series of layers that stack onto each other (i.e. share the same co-ordinates). The navigation bar contains the following hyperlinks;

Add User
Delete User
Edit User

Depending on which link the user clicks depends on the layer shown in the centre of the page. For example, if the user clicks on Add User then a layer called addUser will be shown containing a form where the user will be required to add their details. The action property of the form calls another page called add_user.asp which adds the new user to the recordset and database. add_user.asp then redirects the user (response.redirect “index.asp”) back to index.asp with the addUser layer visible so that another user can be added. This is easy enough if I set the z-order of the layers to the following;

addUser = 1
editUser = 2
deleteUser = 3

However, by doing this the addUser layer will be shown each time index.asp is loaded which is not desirable!

For example, if I clicked the hyperlink ‘Delete User’ from the navigation bar the deleteUser layer would be displayed in the centre of the page which contains a table listing all the users. The user names are hyperlinked to another page called delete_user.asp which makes the necessary changes to the recordset and redirects the user back to index.asp. Here is where i am stuck – ideally the user would be redirected with the deleteUser layer displayed, but the z-order is such that the addUser layer will always be displayed when index.asp loads.

Is there a way I could redirect the user to index.asp and specify the z-order (or visibility) of the layers??

Sorry for the essay!!!

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@russell_g_1Dec 27.2003 — If you're using asp, why not just deliver the pages separately. You could use the same page but pass a different arg in the request object or something to make it respond with the right content.
Copy linkTweet thisAlerts:
@yelleniumauthorDec 27.2003 — [I]pass a different arg in the request object or something to make it respond with the right content[/I]

can you please explain to me what you mean.

thanx rusell_g_1
Copy linkTweet thisAlerts:
@russell_g_1Dec 27.2003 — your links in the menu will look like this.

index.asp?page=add

index.asp?page=edit

index.asp?page=delete

when you process the index.asp page you just do

select case lcase(request("page"))

case "add"

'do add code

case "edit"

'do edit code

case "delete"

'do delete code

end select

this will enable you to output the right code in the first place rather than rely on a client-side technology to do it.
Copy linkTweet thisAlerts:
@russell_g_1Dec 27.2003 — you could build the entire sie using a single asp page if you wanted to. I actually do something very similar to this quite often and just change the content based upon the args passed in.
×

Success!

Help @yellenium spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...