Web Development

74K

Solutions

49K

Contributors

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

Share tech news, updates, or what's on your mind.

Sign up to Post

There are two buttons in PHP. If user click button 1, it will go to action1.php. If user click button2, it will go to action2.php

Any idea how to code it ?

Thx
0
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 13
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

We are getting a CORS error when trying to run and API request from one of our subdomains to another. I saw an htaccess fix...

<ifmodule mod_headers.c="">
   SetEnvIf Origin "^(.*\.MyDomain\.com)$" ORIGIN_SUB_DOMAIN=$1
   Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
   Header set Access-Control-Allow-Methods: "*"
   Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</ifmodule>

I added that to the htaccess file of where the API request was going *to*, but we still get the error. Does it need to go in the htaccess of the site the request is coming *from*? Or both? In other words, does the htaccess stuff need to live where the request originates or where the request is processed? Or both?
0
I'm getting an intermittent issue with the below switch on line 10
 function _dtmSetOAO4Vars(id1) {

        id1 = id1.toLowerCase();

        switch (true) {
            case (id1.indexOf("primaryinfo") != -1):
                s.events += (s.events == '') ? "event1" : ",event1";
                _dtmCheckOAO4IDTypeSelected();
                break;
            case (id1.indexOf("additional_primary_info") != -1):
                _dtmCheckOAO4emailConfirmCheckbox();
                _dtmCheckOAO4primaryPhoneInput();
                break;
            case (id1.indexOf("funding") != -1):
                if (!_dtmCheckFundValExists("_dtmFundType")) {
                    _dtmInsertStaticTags(sTags4);
                }
                _dtmInitFundingElements();
                break;
            case (id1.indexOf("residency") != -1):
                _dtmReportOAO4FundingMethod();
                s.events += (s.events == '') ? "event4" : ",event4";
                break;
            case (id1.indexOf("kyc") != -1):
                _dtmCheckEmploymentStatus();
                break;
            case (id1.indexOf("tell_us_more") != -1):
                _dtmRemoveMonitoredElements();
                sessionStorage.removeItem("_dtmOaoReloaded");
                break;
            case (id1.indexOf("done") != -1):
                s.events += (s.events == '') ? "event2" : ",event2";
                setTimeout(_dtmCheckOAO4Decision, 2000);
                break;
            default:
  

Open in new window

0
Using javascript only (no jQuery) I have multiple span tags with the same class. I want to grab the innerHTML for this specific element so I can get the request ID ==> E4230
<span class="need-help-section"> Your Online Request ID is: <br> <strong>E4230</strong> </span>

Open in new window

Thanks!
0
Using JavaScript, how would I grab the text from this element
<div class="botw-panel-header no-print">
<h2>Step 1</h2>
</div>

Open in new window

So in this example, I'd want "Step 1" returned. There are other h2 elements on the page so we have to also use the class.

Thanks!
0
This is from a navigation. Using JavaScript, I need to detect which item is selected, each time. How would I determine which <li> is active and return the text?
<ul class="botw-step no-print">
<li class="step-item active "> Online Loan Application </li>
<li class="step-item "> Loan Information </li>
<li class="step-item "> Personal Information </li>
<li class="step-item "> Verify &amp; Confirm </li>
</ul>

Open in new window

so in the above example, I'd want "Online Loan Application" returned.
Thanks!
0
New site: http://146.66.113.175/~techgard/

Blog page listing categories: http://146.66.113.175/~techgard/blog/

Category page: http://146.66.113.175/~techgard/category/cyber-security/

Single post page: http://146.66.113.175/~techgard/capital-one-whats-in-your-network/

I want to be able to style the category page and the single post page without buying Elementor pro. We're using template Gridlabs with elementor.

Are there any great tutorials out there? Or is there a plugin that will allow me to do this easily? Thanks.
0
Hi,

I have added the line $wgExternalLinkTarget = '_blank' to LocalSettings.php so that external links open in a new windows and this works fine.  I also want to open internal links, e.g. PDF links in the same way.  Is there an easy solution to this, similar to external links?
0
Hi Experts,

I was given access to production server (admin) thru SSH/SFTP.

Tried changing something on a PHP file (using Core FTP LE), was able to edit/override and it got saved as well, however don't see them affecting my site.
Guess I'm missing something just don't know what...
Tried clearing app cache but didn't help.

In addition, when right clicked on a JavaScript file and selected Edit, did not gave me an option to open with Notepad, just threw some error, as though I was trying to execute it.
How can I accomplish that?

Thanks
0
I had the following code that worked but now the web-app has changed and there re multiple "btn-grp-back" on the page. Here is the "Edit" link element:
<div class="row btn-row-group"><button type="button" class="btn btn-mobile btn-tertiary btn-grp-back mt-5" data-name="btn-grp-back">Edit</button></div>

Open in new window

and here is the previously working code:
    function _dtmCheckFundingEditLink() {
        editLink = document.querySelectorAll('.btn-grp-back');

        if (editLink != null) {
            editLink[2].addEventListener('click', _dtmGetCurrentFundingAmount, false)
        } else {
            setTimeout(_dtmCheckFundingEditLink, 1000);
        }
    };

Open in new window

So my question is what is the best way to target this specific element and add the event listener to it? Using the index " editLink[2]" is not stable.
Thanks!
0
Learn Ruby Fundamentals
LVL 13
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Hi Experts,

How can I create a formula field as follows.

CASE 
WHEN [@Field:Status] <> 'Draft' Then (select NotificationEmail from Caregivers where TimeAttendancePIN = [authfield_Nurse_UserName] and [No_Auto_Emails]= 0) 
Else  ' ' 
End

Open in new window


Getting error attached.

Purpose, I need to send an auto email for users filling a form with Status field = "Completed". (Caspio forms)

Thanks
0
This portfolio plugin here is fine, but I want to customize the link on the detail button.  http://146.66.113.175/~techgard/products/

For instance, on the IX details button, instead of going to http://146.66.113.175/~techgard/portfolio/ix-systems/, I would like it to go to http://146.66.113.175/~techgard/ix-storage 

1. Can I update that in the database?
2. Or can I just do a permanent redirect with htaccess?
3. If I do, will it get overwritten if I update the plugin?
4. Any other way to do this?

Plugin is: https://wordpress.org/plugins/filterable-portfolio/ on WP 5.2.3. Thanks!
0
Regarding the JavaScript below, I'm not sure why when I click this button:
<button class="btn btn-mobile btn-grp-next btn-next-funding_amount mt-5" data-name="btn-grp-next" type="button"><span>CONTINUE</span> <i class="icon-arrow-thin-right"></i><i class="spinner"></i></button>

Open in new window

The following code doesn't detect the "CONTINUE" button being clicked for some reason?  I do get into the function below but it is NOT passing the button element,  I get the same result as clicking anywhere on the page and NOT the continue button. The listener is attached to document.body.
var saveInfosInSessionStorage = function(event) {

    var target = event.target;
    console.log("#### ==>  target.type: " + target.type + "  ===>   target.dataset", target.dataset);
    if (target.dataset && (target.type == "button")) {
        var fType;
        if (target.dataset.value) {
            fType = target.dataset.value;
            switch (fType) {
                case "Fund Now":
                    ...
                    break;
                case "Fund Later":
                    ...
                    break;
            }

        } else if (target.dataset.name) {
            fType = target.dataset.name;
            switch (fType) {
                case "btn-grp-next":
                    console.log("============== CONTINUE BUTTON CLICKED =================");
                    break;
            }
        }
    }
};

Open in new window

The console.log on line #4  shows the type as undefined and shows the data.set as "DOMStringMap" . So it acts as if I never clicked the "CONTINUE" button?data.set output
I have no idea why this is happening or how to fix?  Thanks!
0
Hi, My boss wants this:  http://146.66.113.175/~techgard/products/  A few rows of logos, filterable by category, with a details button that leads to another page.

The problem is, all the plugins I find that do the filterable option don't allow a link to a separate page. So instead of going to:  http://146.66.113.175/~techgard/portfolio/ix-systems/ on the IX logo, she wants to go to a page of her own making: http://146.66.113.175/~techgard/ix-storage/

Maybe I'm not looking for the right kind of plugin, so I thought I'd ask the experts. Thanks,
0
http://146.66.113.175/~techgard/ix-storage/ What is the simplest way to make the bullets a black disc instead of these checkmarks? I see that it seems to be using an icon. Thanks!
0
Hi Experts,

I have a jQuery command that outputs all the required fields in my form as follows.

jQuery("[required='required']") to get a jQuery list

Open in new window


0: input#InsertRecordVisit_Date.cbFormTextField
1: input#InsertRecordClient_Last_Name.cbFormTextField
2: input#InsertRecordClient_First_Name.cbFormTextField
3: input#InsertRecordDate_Of_Birth.cbFormTextField
4: select#InsertRecordShift_From_Hour.cbFormSelect
5: select#InsertRecordShift_From_Minute.cbFormSelect
6: select#InsertRecordShift_To_Hour.cbFormSelect
7: select#InsertRecordShift_To_Minute.cbFormSelect

Now my question, how can I have it only displayingh the actual fields names separated by commas, like this.
Visit_Date,Client_Last_Name,Client_First_Name,...

Thanks
0
If you take this page: https://www.magickitchen.com/test-bounce.html and test it on Google's mobile tester: https://search.google.com/test/mobile-friendly?url=https%3A%2F%2Fwww.magickitchen.com%2Ftest-bounce.html  You will see that the page isn't mobile friendly.

With the help of some experts here, I was able to narrow that down. By removing the classes  animated bounceInDown  from the orange circles under How it Works, the page becomes mobile friendly again.

Is it possibly just this css on bounceInDown? transform: translateX(400px);

I hope that is enough information, thanks.
0
The following aligns inline on a laptop but the input and the submit are stacked vertically on my iPhone.  Can someone tell me what is missing from my structure please?

    <form role="form" class="form-inline" name="which_event" method="post" action="page_name.asp?event_id=<%=lEventID%>">
    <select class="form-control" name="events" id="events" onchange="this.form.get_event.click()">
        <option value="">Select Event</option>
        <%For i = 0 to UBound(Events, 2) - 1%>
            <%If CLng(lEventID) = CLng(Events(0, i)) Then%>
                <option value="<%=Events(0, i)%>" selected><%=Events(1, i)%></option>
            <%Else%>
                <option value="<%=Events(0, i)%>"><%=Events(1, i)%></option>
            <%End If%>
        <%Next%>
    </select>
    <input type="hidden" name="submit_event" id="submit_event" value="submit_event">
    <input type="submit" class="form-control" name="get_event" id="get_event" value="Get This Event" tabindex="19">
    </form>

Open in new window

0
I have this bookmark code integrated into my website.  When clicking the book mark link it alerts the user to press CTRL-D and then when they click OK it closes the alert.  Is there any way to make the OK button actually perform the same function of CTRL-D? I would change the message to inform the user this would happen.  

Credit - Iambriansreed at StackOverflow
<script type="text/javascript">
    $(function() {
        $("#bookmarkme").click(function() {
            // Mozilla Firefox Bookmark
            if ('sidebar' in window && 'addPanel' in window.sidebar) { 
                window.sidebar.addPanel(location.href,document.title,"");
            } else if( /*@cc_on!@*/false) { // IE Favorite
                window.external.AddFavorite(location.href,document.title); 
            } else { // webkit - safari/chrome
                alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != - 1 ? 'Command/Cmd' : 'CTRL') + ' + D to bookmark this page.');
            }
        });
    });
</script>

Open in new window

And the link...
<a id="bookmarkme" href="#" rel="sidebar" title="bookmark this page">Bookmark This Page</a>

Open in new window

And the library...
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

Open in new window

1
Become a Certified Penetration Testing Engineer
LVL 13
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

We have a proprietary and patented video processing software that we license to others and we use on our own sites.  A couple or our sites/apps get approximately 3 million page views per month and are on the verge of profit.  The plan is to expand/scale the sites we own in the next six to twelve months.  This scaling presents us with a opportunity to update everything in our system.  Even though they were launched only a few years ago, so much has changed that we are forced to look at the whole architecture from hosting to platforms and development environments, etc.  We are truly a garage startup and have to make the most of limited resources while trying to present a high quality solution.  It is difficult and stressful.  We cannot afford to get this wrong thus my appeal to the many experts here. We are starting with a clean slate and very much need to hear from experienced professionals to help us put together the best possible system from the top down.

Server/website -  up to now we have used dedicated hosting.  It appears that VM is now a good and much less expensive option.  I am OK with that.  In speaking with other insiders it seems that more and more people are going toward utilizing Azure or Amazon for hosting.  We do have licensees in Europe who must be served by hardware in Europe due to latency issues.   I think Azure or other allows a much quicker provisioning of another instance in whatever geographical area needed, that we can then customize …
0
https://search.google.com/test/mobile-friendly?id=vrughLHv7-LfXilg5Zu_Ng  that test says the page isn't mobile friendly, and the screenshot shows this:


Capture.JPG
But I can't replicate that in Chrome. It looks fine in Chrome. How can I test and fix this issue? Thanks.
0
I am curious what technology trends are on Technology Officer's minds and what you think every company should be aware of right now.   What practices to you incorporate within your company to make sure your whole team is aware of these trends and making the right decisions?
1
Hi, I want to add an image box, with image to the left, then under the text have a button. But I want the button within the box, so it is aligned to the right of the photo.

What I have is this, two sections:
two-sections.JPG
But I want this, with the button in the same section:

1section.jpg
0
https://search.google.com/test/mobile-friendly?id=vrughLHv7-LfXilg5Zu_Ng  Hi, the site has been mobile friendly for some years now, I see their screenshot shows the site sort of off to the side, but I don't see that in Chrome inspector.

Can anyone help me with that? thanks
0
We are using CKEDITOR 4 for our system and we are writing various plugins for it.
I have been asked to create a plugin that counts the number of words inside a blockquote tag.

While I am able to count the number of words and characters for the entire content (or selection of it), I find it difficult to count the words within a specific tag like blockquote. What is the best way to do this in jQuery?

On line 72 I have a jQuery object $content. This is a div that contains all the text. Shouldn't I be able to loop through all blockquotes and then count the words and the blockqoutes?

Any help would be appreciated.

Massimo

	/**
	 * CKEDITOR
	 */
	initCountCommand: function(editor) {
	        editor.addCommand("gaCountCommand", {
	            exec: function(editor) {
	                var map = _PPSEditorApi._count(editor, true);

	                var args = [map[MODE_CHARACTER_COUNT], map[MODE_WORD_COUNT]];

	                var notification = PPSEditorApi.getTMSText("pps", "editor.wordCount.ui.info.notification", args);
	                PPSEditorApi.notification(notification, "info"); //TODO move this function to API and make sure that text is TMS friendly.
	            }
	        });
	    },


	    /**
	     * Internal, private API for this plugin
	     */
	    var _PPSEditorApi = {
	        _update: function(editor) {
	            var map = this._count(editor);
	            var editorName = editor.name.replace("[", "\\[").replace("]", 

Open in new window

0

Web Development

74K

Solutions

49K

Contributors

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.