top of page

Forum Posts

Alec McCutcheon
Jan 09, 2020
In Coding with Velo
Can someone help me figure out why every time the function runs, it scrolls me back to the top of the page. I would like it to stay were I am on the page, I don’t care if it scrolls when the resolution changes but while on the current page I’d like it to not scroll back up to the top every time it runs. I think it might be because the wixLocation !== "/home1" isn't working so it keeps refreshing the page and scrolling me back up but still don't know why it's not working..... Here's my code: import wixWindow from 'wix-window'; import wixLocation from 'wix-location'; $w.onReady(function() { setInterval(function() {makeResponsive()}, 400); } ); function makeResponsive() { wixWindow.getBoundingRect() .then((windowSizeInfo)=>{ let windowWidth = windowSizeInfo.window.width; if (((windowWidth <= 1280) && (wixWindow.formFactor === "Desktop")) && (wixLocation !== "/home2")) { //show & hide or change style properties for 720p or below wixLocation.to("/newsite/home2"); } else if (((windowWidth > 1280) && (wixWindow.formFactor === "Desktop")) && (wixLocation !== "/home1")) { //show & hide or change style properties for 1080p wixLocation.to("/newsite/home1"); } } )}
0
40
570
Alec McCutcheon
Jul 12, 2019
In Coding with Velo
Working one a website for a business, specifically in automotive repair, my problem is that I have repeaters with dropdowns that filter them, in the live site the filters don't work, and on the mobile site some elements in my repeaters don't work this is happening on the vehicles page here is the link for the techs https://editor.wix.com/html/editor/web/renderer/edit/398de7d0-c7c3-4b71-b493-4bc4c04ca421?metaSiteId=fdae0666-a6b9-4305-9341-40f30002b7ca&editorSessionId=6724c348-b52c-4923-88a6-627dad5ec8f6&referralInfo=dashboard
0
5
274
Alec McCutcheon
Jun 28, 2019
In Coding with Velo
I Have a Button Called: "GetQuote" and I have a textbox Called: "Model" inside my Repeater, the Textbox is linked The Fieldkey "model" in my dataset collection Called: "Vehicles" Lightbox code is at the bottom \/ Page Code: import wixData from 'wix-data'; import wixLocation from 'wix-location'; import wixWindow from 'wix-window'; export function Vechicles_itemReady($item, itemData, index) { const carfax = $item("#carfax"); const vin = $item("#Vin"); const GetQuote = $item('#PriceQuotebutton') let baseurl = "https://www.carfax.com/VehicleHistory/p/Report.cfx?partner=DLR_3&vin=" carfax.onClick( (event) => {wixLocation.to(baseurl + vin.text);}) GetQuote.onClick((event)=>{ let $repeaterItem = $w.at(event.context); let Model = $repeaterItem('#Model').text; wixWindow.openLightbox("PriceQuote", Model); }); } Basically I just need set whatever Model.text is to a text box Called: "QuoteVehicleModel" on my Lightbox. My Lightbox Code: import wixData from 'wix-data'; import wixLocation from 'wix-location'; import wixWindow from 'wix-window'; $w.onReady(() => { let receivedData = wixWindow.lightbox.getContext(); const Model = receivedData['Model'] Model.text = $w('#QuoteVehicleModel').text; }); Not Sure what I'm doing wrong Help Plzz lol
0
1
171
Alec McCutcheon
Jun 26, 2019
In Coding with Velo
title basically sums it up but, I want to click a button in a Repeater and have a fieldkey in one of my data sets be added to the link that the button goes to. I'm new at coding on Wix so i apologize if my code is wayyyy off and or the Title this seems to work kinda but only once and only for the first listing in the repeater import wixData from 'wix-data'; export function carfax_click(event, $w) { carfaxUrl(); } function carfaxUrl (){ let vin = $w('#Vin').text; $w("#carfax").link = ("https://www.carfax.com/VehicleHistory/p/Report.cfx?partner=DLR_3&vin=" + vin) $w("#carfax").target = "_blank"; } "vin" in this case is a cars vin number so that once its added it would go to that cars carfax page Also: If some could show me the code to make a range slider with new slides that filters the repeater based on the range of number fieldkeys
0
6
726

Alec McCutcheon

More actions
bottom of page