473,466 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Change url before navigate to it

1 New Member
Hi all!

I am developing a new add-in for firefox, a firefox extension, and i need to check and url before navigate to it in order to correct it (if the url is bad-written like htxp://www.something.com it will correct to http://www.something.com)

What function should I handle to be able to do that?

Thanks for any help :D
Jul 4 '07 #1
2 2842
gits
5,390 Recognized Expert Moderator Expert
hi ...

for that purpose you may use different methods ... javascripts build in string-operations (substring, indexof, replace, join ... ) or use an regEx with the replace()-method (with regEx you may use the match-method to explode the string-value).

example:

Expand|Select|Wrap|Line Numbers
  1. // this replaces all s-chars in 'stest'
  2. 'stest'.replace(/s/g, 't');
  3.  
try something and post back when you have more questions.

kind regards
Jul 4 '07 #2
kovik
1,044 Recognized Expert Top Contributor
That's quite an.... interesting idea for an add-on....

Make sure you use regex to check if it's a valid URL before messing around with it. There are a lot of example URL patterns online.
Jul 4 '07 #3

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

Similar topics

0
by: Sylvain Audet | last post by:
Hi there! We are experiencing a very strange problem with our VB.NET application. The application is using .NET Framework v1.1.4322 and the problem is experienced only by Windows XP users. ...
2
by: Rick | last post by:
I have an XML document that is generated from Infopath, I need to change the value of a namespace that is defined in a node in the form: <xsf:xDocumentClass "xmlns:my=valuehere">. when i navigate...
0
by: Husam | last post by:
Hi EveryBody: I got this decleration from msdn documntation which is: object.Navigate( _ url As String, _ _ _ _ )
4
by: andreas.w.h.k. :-\) | last post by:
How do I change the address location in the wsdl <wsdl:port name="SearchSoap12" binding="tns:SearchSoap12"> <soap12:address location="http://searchservices/engine/search.asmx" /> </wsdl:port> ...
2
by: Ryan Ramsey | last post by:
I have been chasing this one down for a week and have narrowed it down to a machine issue. I have the following code: webBrowser.Navigate(http://finao.net/post_dkp.php?database=40); Basically...
5
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the text in the url/location bar?...
2
by: samueltilden | last post by:
I started a new job and the version of Visual Studio 2005 that I am now using does not have the Navigate Backward Button nor the Navigate Forward Button in the Standard Toolbar, and they are not...
5
by: timnels | last post by:
I have a web browser control that I'd like to point at a HTML file in my installation directory. I am doing something like: string path = Path.GetDirectoryName(...
4
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi peeps I'm trying to change the default postback of my webpage. I'm trying to create a searchbox where you can just press enter and it goes to the search results (ala apple.com *ahem* :o) ...
1
by: Ben | last post by:
I want to change the tabindex within a user control without having to set all of the other user controls contained in the xaml main file. Currently, the other user controls tabindex navigate how...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.