RE: Link to a specified spot in a page (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


hhammash -> RE: Link to a specified spot in a page (9/4/2002 18:54:21)

Thank you for your time and help zac,

Good night.


cu
Hisham




Lydecker -> RE: Link to a specified spot in a page (9/4/2002 18:58:15)

I am not aware of any javascript that does that, however it really would the DB upgrade.

Do you know how to do what you are trying to do (you can do it on one page) or do you want a guide??

I take it db will have columns:

PageNo, Description, ItemNumber, Quantity, Ex Date, Price




hhammash -> RE: Link to a specified spot in a page (9/4/2002 19:09:44)

Hi,

Yes, I think DB will be better and will have one page instead of tens.

I should start clean. I don' t know what the previous employee had in mind to create statis pages with these info.

I will make it a database and use your previous method about DRW.

Thanks a lot
cu
Hisham




Lydecker -> RE: Link to a specified spot in a page (9/4/2002 19:43:11)

Okay if you want to know how to make it all on only one page and how to make it filter out ONLY the record selected (not just going to the right place in the table) - ten re open this topic once you have your database done.

Best of Luck[;)]




hhammash -> RE: Link to a specified spot in a page (9/5/2002 1:27:21)

Thanks lydecker




hhammash -> RE: Link to a specified spot in a page (9/6/2002 14:00:25)

Any other suggestions?




Spooky -> RE: Link to a specified spot in a page (9/6/2002 19:58:41)

When you link to a bookmark, the same answer will be :
http://www.frontpagewebmaster.com/tm.asp?m=88384&p=1&tmode=1

You will have paging, a link to page x and include the bookmark as :

www.website.com?X=value&#bookmark

It seems in you post you did successfully use bookmarks or did I miss something?




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/6/2002 21:30:39)

Hisham~

I never heard back from you on what type of example you would like...

Are you just returning the single row or returning all of them and then highlighting the specific record? Do you want to color the row to hightlight, bold it, or what? Let me know and I can work up an example...

~no_mac_jack




hhammash -> RE: RE: Link to a specified spot in a page (9/7/2002 6:35:25)

Hi,

Spooky: Thanks for your reply
I used the bookmarks properly yes. But what I meant is that: From the DRW link to a normal HTM and find the IDNumber, without inserting a bookmark on the destination page becasue I have thousands of items It will take a long time to insert bookmarks. What I wanted is something like. From DRW in the IDNumber field to make a hyperlink to the htm page, and when the htm page opens I want it to make a search like using " Find" command automatically, and that " Find" command takes the IDNumber fromt he hyperlink. In this way it will be like using Edit/Find when you are in a page. IS IT POSSIBLE or I am just dreaming.


no_mack_jack: Thanks for your support:
I am sorry I did not reply yet, the boss has not decided yet. Your idea of taking all those information into a database is the right choice which we are going to do. If it is possible, I would like the whole record to be highlighted in a different color, but keep the whole listing of the DRW, if it is not possible, It is OK to list the found record only, which is easy.

Sorry for the delay no_mac_jack. I was going to reply after the weekend.

Still the idea of searching a page is very nice. Suppose you are in a very big page, you want to find a word, you just select Edit/Find and time the word in a box. I am wondering if it can be done in VBScript. When you send a parameter in a hyperlink to a page, the page loads, takes that parameter conduct an Edit/Find command automatically and highlights the word. Some kind fo a macro

Regards and thank you all
Hisham




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/7/2002 19:52:36)

Sorry, Hisham...I didn' t mean to rush you or anything. I was just confused because in your e-mail I got the impression that we would wait until the DB stuff was done, but then your forum posting looked like you wanted something now. Just a misunderstanding on my part.

Here' s an example of what I would do (this is in the drw area)...

<%
If (Request.Querystring(" ItemNo" ) = FP_FieldVal(fp_rs," ItemNo" )) then
strColor = " #FFFF00" ' this is the highlight color
Else
strColor = " #FFFFFF" ' this is the normal color
End If
%>

<tr>
<td bgcolor=" <%=strColor%>" ><a name=" <%=FP_FieldVal(fp_rs," ItemNo" )%>" ><%=FP_FieldVal(fp_rs," ItemNo" )%></a>
</td>
<td bgcolor=" <%=strColor%>" ><%=FP_FieldVal(fp_rs," Field1" )%>
</td>
<td bgcolor=" <%=strColor%>" ><%=FP_FieldVal(fp_rs," Field2" )%>
</td>
</tr>

Something as simple as that could do the trick. It creates a bookmark using the item number so that you don' t have to. It also makes the row a certain color depending on whether or not the record' s item number matches the one in the querystring.

Let me know if you have any questions. Again, I' m sorry for the confusion!

~no_mac_jack




hhammash -> RE: RE: Link to a specified spot in a page (9/8/2002 0:27:49)

Hi no_mack_jack,

On the contrary, you are not rushing me or anything, you are helping me with dedication and honesty, I appreciate it a lot. But all last Thursday until Friday evening our IT department disabled the email server (Outgoing messages) because they were upgrading it to iPlanet.

Besides, in my last posting as you have seen I submitted a new idea which I hope it works for other reasons not for the one you are talking about.

Back to our subject. Where shall I insert the code that you posted? After the first Include file, After the second ..etc.

Best regards
Hisham




Spooky -> RE: RE: Link to a specified spot in a page (9/8/2002 1:01:09)

If you already have a page with 1000' s of items, and its HTM, then no I dont have a good answer

I assumed you had an asp page that generated the 1000' s of results which meant you could automatically insert the bookmark code as NMJ has showed above.

If thats the case, then the discussed code will work.

If the results page is existing, and its HTM then.........[:j]




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/8/2002 2:12:20)

I updated my last post with color coding. The red stuff is what' s important. The rest of it is just my example code that shows you how you would apply it to your table structure (the bgcolor, for example). That chunk of code is taken directly from *between* the two fpdbrgn includes in my sample page.

Let me know if you have trouble configuring it....

~no_mac_jack

BTW- You might post your question about using the browser' s " Find" feature as a new thread in one of the other sections and see if you get anything.




hhammash -> RE: RE: Link to a specified spot in a page (9/8/2002 2:31:32)

Hi,

Thank you NMJ, I will try this code and put it in between the Include, and I will let you know [:)].

Thanks a lot for you continuous support NMJ.

Hi Spooky:
Why they are HTM? We had an old fashioned employee, who was working in finance. He entered the whole fixed asset list in Excel then saved them as HTM, and did not keep the excel sheet. When I was given the project they asked me if there is a way to do a searching on an HTM page.

Imagine, a building of 3 blocks, each block has 4 stories, the faculty has over a 1000 employess. All the furniture, computers ..etc was there.

Now as NMJ suggested before, I set up a team of (4) to re-input the data into a database and work on it.

Thank you for your support Spooky.

Thank you all
Hisham




Spooky -> RE: RE: Link to a specified spot in a page (9/8/2002 4:37:55)

Its always fun picking up where someone else left off ;-)




hhammash -> RE: RE: Link to a specified spot in a page (9/8/2002 7:45:21)

Of course it is [:D]

Thanks Spooky




Lydecker -> RE: RE: RE: Link to a specified spot in a page (9/8/2002 9:13:44)


quote:

ORIGINAL: Spooky

If you already have a page with 1000' s of items, and its HTM, then no I dont have a good answer

I assumed you had an asp page that generated the 1000' s of results which meant you could automatically insert the bookmark code as NMJ has showed above.



Thats what I was going by above [:(]




hhammash -> RE: RE: Link to a specified spot in a page (9/8/2002 12:31:34)

Hi Zac,

I know, but the matter turned into:

1- Believing in inputing the data into a database and a DRW
2- Wanting to have the find option for other reasons

Thanks
Hisham




hhammash -> RE: RE: Link to a specified spot in a page (9/10/2002 0:38:41)

Hi NMJ,

It is working fine. See it at:
http://www.fmhs.uaeu.ac.ae/nml/NorthWind/CustomerList.asp

BUT: The result is coming in one line only. I thought the whole DRW would appear and the only wanted line will be highlighted only.

This code is nice
Thanks
Hisham




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/10/2002 18:47:22)

Hmmm...not sure why it' s doing that. I just made a sample page with the same northwind data and it works fine. Here' s the main chunk of my code...

<!--#include file=" _fpclass/fpdbrgn1.inc" -->
<%
If (trim(Request.Querystring(" CustID" )) = FP_FieldVal(fp_rs," CustomerID" )) then
strColor = " #FFFF00" ' this is the highlight color
Else
strColor = " #FFFFFF" ' this is the normal color
End If
%>
<tr>
<td bgcolor=" <%=strColor%>" >
<a name=" <%=FP_FieldVal(fp_rs," CustomerID" )%>" ></a>
<a href=" CustomerSearchResults.asp?CustomerID=<%=FP_FieldVal(fp_rs," CustomerID" )%>" ><%=FP_FieldVal(fp_rs," CustomerID" )%></a>
</td>
<td bgcolor=" <%=strColor%>" ><%=FP_FieldVal(fp_rs," CompanyName" )%>
</td>
<td bgcolor=" <%=strColor%>" ><%=FP_FieldVal(fp_rs," ContactName" )%>
</td>
<td bgcolor=" <%=strColor%>" ><%=FP_FieldVal(fp_rs," ContactTitle" )%>
</td>
</tr>
<!--#include file=" _fpclass/fpdbrgn2.inc" -->

Does that look like what you had? I tested it to make sure that if no ID was passed in the querystring, it would not highlight anything. I also tested it with a ID and a bookmark like this...

mypage.asp?CustID=CONSH&#CONSH

That also worked. Maybe you can see a discrepancy in the code? Let me know...

~no_mac_jack




hhammash -> RE: RE: Link to a specified spot in a page (9/11/2002 0:16:31)

Hi NMJ,

I have two pages. One which lists the Customers, the second is also a DRW which receives the parameters from the link in the first page.

The code that you sent is for the first page, right?

- Is it on the diet?

I tried it and am still getting one record in the second page. The question is, is it possible to have the whole Database Results listed all the time with the requested record highlighted?

Regards
Hisham




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/11/2002 18:35:23)

Well, I just assumed that the link you posted was the page that you wanted to highlight a certain record on, so I did the code for that (and it should only highlight the customer who' s ID is in the querystring (see my sample url above).

>>The question is, is it possible to have the whole Database Results listed all the time with the requested record highlighted?

Yes, that' s what my sample page does/did. To have the second page list everyone, it' s just a matter of not limiting your query with WHERE customerID = blablabla. So your query would be something like...

SELECT * FROM customers

Then, you use the code I gave you (changing field names as appropriate) to have it highlight the record specified in the querystring.

If that still doesn' t make sense, send me your code and I' ll show you what I mean. Good luck! [:)]

~no_mac_jack




hhammash -> RE: RE: Link to a specified spot in a page (9/12/2002 0:42:10)

Hi NMJ,

I changed the SQL and worked just perfectly.

Thanks a lot
Hisham




no_mac_jack -> RE: RE: Link to a specified spot in a page (9/12/2002 20:29:27)

[:)] No problem. Have a good one!

~no_mac_jack




hhammash -> RE: RE: Link to a specified spot in a page (9/13/2002 16:54:58)

Hi NMJ,

Thanks for your sincere help.

Hisham




Page: <<   < prev  1 [2]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375