473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Treeview linking to wrong directory

308 256MB
Hi All,

In an attached the shot - Exple.jpg



Expand|Select|Wrap|Line Numbers
  1. Node1 is referred to default1.aspx
  2. Node1.1 is referred to Folder1/default11.aspx
  3. Node1.1.1 is referred to Folder1/default111.aspx
On mouse-Hover of the Node 1.1.1, the status bar shows http://localhost/Folder1/Folder1/default111.aspx Please note that the Node 1.1 is clicked prior to the Node 1.1.1.

Could anyone help me to understand technical reason behind why this is happening?
Attached Images
File Type: jpg Exple.jpg (5.3 KB, 274 views)
Sep 1 '12 #1
23 2380
madankarmukta
308 256MB
Anyone, Guesses/thesis please.
Sep 2 '12 #2
acoder
16,027 Expert Mod 8TB
Without code, it'd be difficult to say.

The problem isn't clear either. What do you expect to see?
Sep 10 '12 #3
madankarmukta
308 256MB
Hi,

Thank you for the reply.

Actually, Node 1.1.1 points to Folder1/default111.aspx page.
Wondering, the click to Node 1.1.1. is trying to find the page at Folder1/Folder1/default111.aspx which results into an error, page not found.

How to get rid of this error?

Thanks.
Sep 10 '12 #4
acoder
16,027 Expert Mod 8TB
You need to link to the page "default111.aspx" without the folder name. Not sure what this has to do with JavaScript.
Sep 17 '12 #5
madankarmukta
308 256MB
A part of nutshell, this is the tree view built via java script.
Sep 29 '12 #6
madankarmukta
308 256MB
@acoder,

Thank you for the reply.
Even accosting the link to the page name w/o the folder path, doesn't solve the problem.

Anyone, Guesses/thesis please.

Thank you.
Oct 10 '12 #7
Rabbit
12,516 Expert Mod 8TB
As was said before, it's hard to tell what's wrong without seeing the code.
Oct 10 '12 #8
madankarmukta
308 256MB
Hi All,

Please guide to solve an incorrect linking problem.

Please find the attached the script.

Below is the Script tag in the page where the above jScript gets called.

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3.         d = new dTree('d');
  4.  
  5.         d.add(0,-1,'Example');
  6.         d.add(1,0,'Node 1','Default1.aspx');
  7.         d.add(3,1,'Node 1.1','Folder1/Default11.aspx');
  8.         d.add(5,3,'Node 1.1.1','Folder1/Default111.aspx');
  9.         document.write(d);
  10.  
  11.  
  12. </script>
  13.  
Please provide insights on why it's linking to the wrong directory.
Attached Files
File Type: txt Script.txt (11.8 KB, 547 views)
Jan 29 '13 #9
Rabbit
12,516 Expert Mod 8TB
What directory is it supposed to link to? What is it linking to instead?
Jan 29 '13 #10
madankarmukta
308 256MB
Hi,

Thank you for the reply.

Once the leaf node of the tree is reached,all directories above in the hierarchy gets repeatedly routed to some non-usual path.

For e.g., as explained in the first post

Node1 refers to default1.aspx
Node1.1 refers to Folder1/default11.aspx
Node1.1.1 refers to Folder1/default111.aspx

On mouse-Hover of the Node 1.1.1, the status bar shows http://localhost/Folder1/Folder1/default111.aspx Please note that the Node 1.1 is clicked prior to the Node 1.1.1.

Ideally, as node 1.1.1 refers to folder1/default111.aspx the status bar should point to the path folder1/default111.aspx
Jan 30 '13 #11
Rabbit
12,516 Expert Mod 8TB
So you're saying the first time you click on each one, it works correctly?
Jan 30 '13 #12
madankarmukta
308 256MB
No, Actually Not.

That time too the user couldn't route to the correct path, if the user tries to navigate to the node by expanding the '+' without clicking the node.

Provide technical insights behind, please.
Jan 31 '13 #13
Rabbit
12,516 Expert Mod 8TB
What's most likely happening is that your base folder is already http://localhost/Folder1/
Jan 31 '13 #14
madankarmukta
308 256MB
Seems hard to infer.

Can that be routed dynamically... As per the user's requirement,if I understood your reply correctly.

If not pls correct me.
Feb 1 '13 #15
Rabbit
12,516 Expert Mod 8TB
There's no need to route the links. Just fix the links so they refer to the correct location.
Feb 1 '13 #16
madankarmukta
308 256MB
The script - put in the post earlier - at every page refers to points to the specific path only.

Releasing nodes randomly, I guess, causes routing.
Feb 2 '13 #17
Rabbit
12,516 Expert Mod 8TB
The paths in your code don't look like "specific" paths. They look like relative paths.
Feb 2 '13 #18
madankarmukta
308 256MB
Actually, They are specific path only; as per my understanding the path input to the javascript only lags at the './' which refer to the current app folder path.I tried that too, it works the same way.

Just for information ,relative path is perplexing the problem than ever thought possible.

Any technical insights.
Feb 3 '13 #19
Rabbit
12,516 Expert Mod 8TB
The reason your paths are relative is because the paths in your code does not start with http://
Feb 4 '13 #20
madankarmukta
308 256MB
I thought, probably that could be the reason but not.Still the cursor is pointing to another path than the specific path for the node.

Please provide technical help.
Feb 4 '13 #21
Rabbit
12,516 Expert Mod 8TB
Post your current code. It sounds like you've modified it.

EDIT
I mocked up your code on my system, I have no problem with it. I maintain that the issue you're having is that your relative paths are wrong and you need to write your paths assuming that Folder1 is already your base folder.
Feb 4 '13 #22
madankarmukta
308 256MB
Hi,

There are some changes in the code but that doesn't link anything to the technical issue posted here.

Just for information,the code behind edits are relevant to functionality of one of the page's content page.This can be inferred to the point that there are no more edits in the script script.js.

Could you pls help me to understand how you tried to mock up the technical issue posted.
Feb 6 '13 #23
Rabbit
12,516 Expert Mod 8TB
I mocked it up by copying your code and setting up the directory structure. I had no issues with the code.

Again, I maintain the stance that the issue is the same thing I've been saying all along. Fix the path references and your code should work fine.
Feb 6 '13 #24

Sign in to post your reply or Sign up for a free account.

Similar topics

42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
5
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a...
1
by: paradox | last post by:
I want to have a TreeView that shows an image on some items, but not all. Basically, if a certain condition is true, a caution icon is placed next to the treeview item. The problem is that, by...
3
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%""...
6
by: L.M | last post by:
Hello, I knew how to use the treeview under VB6. After migrating to .NET, well, I'm lost. I try to add a new node, either to the same level or as a child to a selected node in the treeview....
14
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
3
by: christof | last post by:
I've got a really easy problem, please help me: There are two pages in one I'm creating a TreeView like that: TreeView dbTree = new TreeView(); TreeNode dbTreeRoot = new TreeNode("Root");...
2
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView...
1
by: kvicky | last post by:
I am trying to load child nodes to a TreeNode in a TreeView in a ASP.net web application. The Treeview with parent nodes are loaded on a Page_load while doing if( ! ISPostback ) and then in the...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.